* [PATCH] Fix recently introduced TabError's
@ 2017-05-26 14:09 Petr Lautrbach
2017-05-26 14:33 ` Petr Lautrbach
2017-05-26 14:36 ` Stephen Smalley
0 siblings, 2 replies; 4+ messages in thread
From: Petr Lautrbach @ 2017-05-26 14:09 UTC (permalink / raw)
To: selinux
Commits a3d2c7a 6a7a5aa introduced inconsistent use of tabs and spaces
in indentation what makes python3.6 unhappy.
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
---
libsemanage/utils/semanage_migrate_store | 4 ++--
python/semanage/seobject.py | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/libsemanage/utils/semanage_migrate_store b/libsemanage/utils/semanage_migrate_store
index 9a9fac22..2e6cb278 100755
--- a/libsemanage/utils/semanage_migrate_store
+++ b/libsemanage/utils/semanage_migrate_store
@@ -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)
diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py
index 61be6198..c97a9f0c 100644
--- a/python/semanage/seobject.py
+++ b/python/semanage/seobject.py
@@ -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)
--
2.13.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix recently introduced TabError's
2017-05-26 14:09 [PATCH] Fix recently introduced TabError's Petr Lautrbach
@ 2017-05-26 14:33 ` Petr Lautrbach
2017-05-26 14:36 ` Stephen Smalley
1 sibling, 0 replies; 4+ messages in thread
From: Petr Lautrbach @ 2017-05-26 14:33 UTC (permalink / raw)
To: selinux
On Fri, May 26, 2017 at 04:09:51PM +0200, Petr Lautrbach wrote:
> 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.
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
> ---
> libsemanage/utils/semanage_migrate_store | 4 ++--
> python/semanage/seobject.py | 6 +++---
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/libsemanage/utils/semanage_migrate_store b/libsemanage/utils/semanage_migrate_store
> index 9a9fac22..2e6cb278 100755
> --- a/libsemanage/utils/semanage_migrate_store
> +++ b/libsemanage/utils/semanage_migrate_store
> @@ -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)
> diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py
> index 61be6198..c97a9f0c 100644
> --- a/python/semanage/seobject.py
> +++ b/python/semanage/seobject.py
> @@ -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)
> --
> 2.13.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix recently introduced TabError's
2017-05-26 14:36 ` Stephen Smalley
@ 2017-05-26 14:34 ` Petr Lautrbach
0 siblings, 0 replies; 4+ messages in thread
From: Petr Lautrbach @ 2017-05-26 14:34 UTC (permalink / raw)
To: Stephen Smalley; +Cc: selinux
On Fri, May 26, 2017 at 10:36:59AM -0400, Stephen Smalley wrote:
> On Fri, 2017-05-26 at 16:09 +0200, Petr Lautrbach wrote:
> > 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.
>
> >
> > Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
> > ---
> > libsemanage/utils/semanage_migrate_store | 4 ++--
> > python/semanage/seobject.py | 6 +++---
> > 2 files changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/libsemanage/utils/semanage_migrate_store
> > b/libsemanage/utils/semanage_migrate_store
> > index 9a9fac22..2e6cb278 100755
> > --- a/libsemanage/utils/semanage_migrate_store
> > +++ b/libsemanage/utils/semanage_migrate_store
> > @@ -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)
> > diff --git a/python/semanage/seobject.py
> > b/python/semanage/seobject.py
> > index 61be6198..c97a9f0c 100644
> > --- a/python/semanage/seobject.py
> > +++ b/python/semanage/seobject.py
> > @@ -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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix recently introduced TabError's
2017-05-26 14:09 [PATCH] Fix recently introduced TabError's Petr Lautrbach
2017-05-26 14:33 ` Petr Lautrbach
@ 2017-05-26 14:36 ` Stephen Smalley
2017-05-26 14:34 ` Petr Lautrbach
1 sibling, 1 reply; 4+ messages in thread
From: Stephen Smalley @ 2017-05-26 14:36 UTC (permalink / raw)
To: Petr Lautrbach, selinux
On Fri, 2017-05-26 at 16:09 +0200, Petr Lautrbach wrote:
> 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.
>
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
> ---
> libsemanage/utils/semanage_migrate_store | 4 ++--
> python/semanage/seobject.py | 6 +++---
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/libsemanage/utils/semanage_migrate_store
> b/libsemanage/utils/semanage_migrate_store
> index 9a9fac22..2e6cb278 100755
> --- a/libsemanage/utils/semanage_migrate_store
> +++ b/libsemanage/utils/semanage_migrate_store
> @@ -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)
> diff --git a/python/semanage/seobject.py
> b/python/semanage/seobject.py
> index 61be6198..c97a9f0c 100644
> --- a/python/semanage/seobject.py
> +++ b/python/semanage/seobject.py
> @@ -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)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-26 14:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-26 14:09 [PATCH] Fix recently introduced TabError's Petr Lautrbach
2017-05-26 14:33 ` Petr Lautrbach
2017-05-26 14:36 ` Stephen Smalley
2017-05-26 14:34 ` Petr Lautrbach
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.