Skip to contentSkip to conversation

Fix recently introduced TabError's

PATCH Applied Petr Lautrbach 2 participants 4 messages May 26, 2017 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix recently introduced TabError's

Commits a3d2c7a 6a7a5aa introduced inconsistent use of tabs and spaces in indentation what makes python3.6 unhappy.

---
 libsemanage/utils/semanage_migrate_store | 4 ++--
 python/semanage/seobject.py              | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
libsemanage/utils/semanage_migrate_store +2 -2
index 9a9fac22..2e6cb278 100755
@@ -254,8 +254,8 @@ if __name__ == "__main__":
 		"policy.kern",
 		"file_contexts",
 		"homedir_template",
-                "pkeys.local",
-                "ibendports.local"]
+		"pkeys.local",
+		"ibendports.local"]
 
 
 	create_dir(newroot_path(), 0o755)
python/semanage/seobject.py +3 -3
index 61be6198..c97a9f0c 100644
@@ -1321,10 +1321,10 @@ class ibpkeyRecords(semanageRecords):
         semanageRecords.__init__(self, store)
 
     def __genkey(self, pkey, subnet_prefix):
-	if subnet_prefix == "":
+        if subnet_prefix == "":
             raise ValueError(_("Subnet Prefix is required"))
 
-	pkeys = pkey.split("-")
+        pkeys = pkey.split("-")
         if len(pkeys) == 1:
             high = low = int(pkeys[0], 0)
         else:
@@ -1576,7 +1576,7 @@ class ibendportRecords(semanageRecords):
         semanageRecords.__init__(self, store)
 
     def __genkey(self, ibendport, ibdev_name):
-	if ibdev_name == "":
+        if ibdev_name == "":
             raise ValueError(_("IB device name is required"))
 
         port = int(ibendport)
Signature · 1 line
2.13.0
#1 lore raw
Quoted 3 lines · Petr Lautrbach

Commits a3d2c7a 6a7a5aa introduced inconsistent use of tabs and spaces in indentation what makes python3.6 unhappy.

There's another python3 problem with using "print ". I'll resend another patch which will it together with use of tabs and spaces.

Quoted 50 lines
---
 libsemanage/utils/semanage_migrate_store | 4 ++--
 python/semanage/seobject.py              | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
libsemanage/utils/semanage_migrate_store +2 -2
index 9a9fac22..2e6cb278 100755
@@ -254,8 +254,8 @@ if __name__ == "__main__":
 		"policy.kern",
 		"file_contexts",
 		"homedir_template",
-                "pkeys.local",
-                "ibendports.local"]
+		"pkeys.local",
+		"ibendports.local"]
 
 
 	create_dir(newroot_path(), 0o755)
python/semanage/seobject.py +3 -3
index 61be6198..c97a9f0c 100644
@@ -1321,10 +1321,10 @@ class ibpkeyRecords(semanageRecords):
         semanageRecords.__init__(self, store)
 
     def __genkey(self, pkey, subnet_prefix):
-	if subnet_prefix == "":
+        if subnet_prefix == "":
             raise ValueError(_("Subnet Prefix is required"))
 
-	pkeys = pkey.split("-")
+        pkeys = pkey.split("-")
         if len(pkeys) == 1:
             high = low = int(pkeys[0], 0)
         else:
@@ -1576,7 +1576,7 @@ class ibendportRecords(semanageRecords):
         semanageRecords.__init__(self, store)
 
     def __genkey(self, ibendport, ibdev_name):
-	if ibdev_name == "":
+        if ibdev_name == "":
             raise ValueError(_("IB device name is required"))
 
         port = int(ibendport)
Signature · 1 line
2.13.0
#2 lore raw
In reply to Petr Lautrbach
Quoted 3 lines · Petr Lautrbach

Commits a3d2c7a 6a7a5aa introduced inconsistent use of tabs and spaces
in indentation what makes python3.6 unhappy.

Thanks, applied, and also fixed up print statements -> functions.

Quoted 50 lines

---
 libsemanage/utils/semanage_migrate_store | 4 ++-- python/semanage/seobject.py              | 6 +++---

 2 files changed, 5 insertions(+), 5 deletions(-)
libsemanage/utils/semanage_migrate_store +2 -2
index 9a9fac22..2e6cb278 100755
@@ -254,8 +254,8 @@ if __name__ == "__main__":
  		"policy.kern",
  		"file_contexts",
  		"homedir_template",
-                "pkeys.local",
-                "ibendports.local"]
+		"pkeys.local",
+		"ibendports.local"]



  create_dir(newroot_path(), 0o755)

python/semanage/seobject.py +0 -0
index 61be6198..c97a9f0c 100644
@@ -1321,10 +1321,10 @@ class ibpkeyRecords(semanageRecords):
          semanageRecords.__init__(self, store)


     def __genkey(self, pkey, subnet_prefix):

python/semanage/seobject.py +1 -1
-	if subnet_prefix == "":
+        if subnet_prefix == "":

             raise ValueError(_("Subnet Prefix is required"))

python/semanage/seobject.py +1 -1
-	pkeys = pkey.split("-")
+        pkeys = pkey.split("-")

         if len(pkeys) == 1:
             high = low = int(pkeys[0], 0)
         else:

python/semanage/seobject.py +0 -0
@@ -1576,7 +1576,7 @@ class ibendportRecords(semanageRecords):
          semanageRecords.__init__(self, store)


     def __genkey(self, ibendport, ibdev_name):

python/semanage/seobject.py +1 -1
-	if ibdev_name == "":
+        if ibdev_name == "":

             raise ValueError(_("IB device name is required"))
         port = int(ibendport)

#3 lore raw
Quoted 6 lines · Stephen Smalley
Quoted 3 lines · Petr Lautrbach

Commits a3d2c7a 6a7a5aa introduced inconsistent use of tabs and spaces
in indentation what makes python3.6 unhappy.

Thanks, applied, and also fixed up print statements -> functions.

Great thanks. In this case please ignore my previous email.

Quoted 51 lines
Quoted 51 lines

---
 libsemanage/utils/semanage_migrate_store | 4 ++-- python/semanage/seobject.py              | 6 +++---

 2 files changed, 5 insertions(+), 5 deletions(-)
libsemanage/utils/semanage_migrate_store +2 -2
index 9a9fac22..2e6cb278 100755
@@ -254,8 +254,8 @@ if __name__ == "__main__":
  		"policy.kern",
  		"file_contexts",
  		"homedir_template",
-                "pkeys.local",
-                "ibendports.local"]
+		"pkeys.local",
+		"ibendports.local"]



  create_dir(newroot_path(), 0o755)

python/semanage/seobject.py +0 -0
index 61be6198..c97a9f0c 100644
@@ -1321,10 +1321,10 @@ class ibpkeyRecords(semanageRecords):
          semanageRecords.__init__(self, store)


     def __genkey(self, pkey, subnet_prefix):

python/semanage/seobject.py +1 -1
-	if subnet_prefix == "":
+        if subnet_prefix == "":

             raise ValueError(_("Subnet Prefix is required"))

python/semanage/seobject.py +1 -1
-	pkeys = pkey.split("-")
+        pkeys = pkey.split("-")

         if len(pkeys) == 1:
             high = low = int(pkeys[0], 0)
         else:

python/semanage/seobject.py +0 -0
@@ -1576,7 +1576,7 @@ class ibendportRecords(semanageRecords):
          semanageRecords.__init__(self, store)


     def __genkey(self, ibendport, ibdev_name):

python/semanage/seobject.py +1 -1
-	if ibdev_name == "":
+        if ibdev_name == "":

             raise ValueError(_("IB device name is required"))
         port = int(ibendport)