@@ -301,7 +301,7 @@ def check_kvm(): |
301 | 301 | except CalledProcessError: |
302 | 302 | raise CheckFailed("KVM is not correctly installed on this system, or support for it is not enabled in the BIOS") |
303 | 303 | except OSError as e: |
304 | | - if e.errno is errno.ENOENT: raise CheckFailed("KVM is not correctly installed on this system, or support for it is not enabled in the BIOS") |
| 304 | + if e.errno == errno.ENOENT: raise CheckFailed("KVM is not correctly installed on this system, or support for it is not enabled in the BIOS") |
305 | 305 | raise |
306 | 306 | return True |
307 | 307 | raise AssertionError("check_kvm() should have never reached this part") |
@@ -431,7 +431,7 @@ def done(self): |
431 | 431 | alreadysetup = augtool.match("/files/etc/network/interfaces/iface",self.brname).stdout.strip() |
432 | 432 | return alreadysetup |
433 | 433 | except OSError as e: |
434 | | - if e.errno is 2: raise TaskFailed("augtool has not been properly installed on this system") |
| 434 | + if e.errno == 2: raise TaskFailed("augtool has not been properly installed on this system") |
435 | 435 | raise |
436 | 436 |
|
437 | 437 | def restore_state(self): |
@@ -646,7 +646,7 @@ def done(self): |
646 | 646 | try: |
647 | 647 | return "group virt" in open("/etc/cgconfig.conf","r").read(-1) |
648 | 648 | except IOError as e: |
649 | | - if e.errno is 2: raise TaskFailed("cgconfig has not been properly installed on this system") |
| 649 | + if e.errno == 2: raise TaskFailed("cgconfig has not been properly installed on this system") |
650 | 650 | raise |
651 | 651 |
|
652 | 652 | def execute(self): |
@@ -672,7 +672,7 @@ def done(self): |
672 | 672 | try: |
673 | 673 | return self.cfgline in open("/etc/cgrules.conf","r").read(-1) |
674 | 674 | except IOError as e: |
675 | | - if e.errno is 2: raise TaskFailed("cgrulesd has not been properly installed on this system") |
| 675 | + if e.errno == 2: raise TaskFailed("cgrulesd has not been properly installed on this system") |
676 | 676 | raise |
677 | 677 |
|
678 | 678 | def execute(self): |
@@ -693,7 +693,7 @@ def done(self): |
693 | 693 | try: |
694 | 694 | return self.cfgline in open(self.filename,"r").read(-1) |
695 | 695 | except IOError as e: |
696 | | - if e.errno is 2: raise TaskFailed("qemu has not been properly installed on this system") |
| 696 | + if e.errno == 2: raise TaskFailed("qemu has not been properly installed on this system") |
697 | 697 | raise |
698 | 698 |
|
699 | 699 | def execute(self): |
@@ -712,7 +712,7 @@ def done(self): |
712 | 712 | else: raise AssertionError("We should not reach this") |
713 | 713 | return self.cfgline in open(libvirtfile,"r").read(-1) |
714 | 714 | except IOError as e: |
715 | | - if e.errno is 2: raise TaskFailed("libvirt has not been properly installed on this system") |
| 715 | + if e.errno == 2: raise TaskFailed("libvirt has not been properly installed on this system") |
716 | 716 | raise |
717 | 717 |
|
718 | 718 | def execute(self): |
@@ -742,7 +742,7 @@ def done(self): |
742 | 742 | lines = [ s.strip() for s in open("/etc/libvirt/libvirtd.conf").readlines() ] |
743 | 743 | if all( [ stanza in lines for stanza in self.stanzas ] ): return True |
744 | 744 | except IOError as e: |
745 | | - if e.errno is 2: raise TaskFailed("libvirt has not been properly installed on this system") |
| 745 | + if e.errno == 2: raise TaskFailed("libvirt has not been properly installed on this system") |
746 | 746 | raise |
747 | 747 |
|
748 | 748 | def execute(self): |
|