diff --git a/cpuset/commands/proc.py b/cpuset/commands/proc.py index 269670c..e46675d 100644 --- a/cpuset/commands/proc.py +++ b/cpuset/commands/proc.py @@ -5,6 +5,7 @@ from builtins import str from builtins import range __copyright__ = """ Copyright (C) 2007-2010 Novell Inc. +Copyright (C) 2013-2017 SUSE Author: Alex Tsariounov This program is free software; you can redistribute it and/or modify diff --git a/cpuset/commands/set.py b/cpuset/commands/set.py index b72e452..62d621e 100644 --- a/cpuset/commands/set.py +++ b/cpuset/commands/set.py @@ -1,11 +1,10 @@ """Cpuset manipulation command """ -from __future__ import division from builtins import str -from past.utils import old_div __copyright__ = """ Copyright (C) 2007-2010 Novell Inc. +Copyright (C) 2013-2017 SUSE Author: Alex Tsariounov This program is free software; you can redistribute it and/or modify @@ -483,10 +482,10 @@ def set_details(name, indent=None, width=None, usehex=False): if width != 0 and len(tst) > width: target = width - len(out) - patha = set.path[:old_div(len(set.path),2)-3] - pathb = set.path[old_div(len(set.path),2):] - patha = patha[:old_div(target,2)-3] - pathb = pathb[old_div(-target,2):] + patha = set.path[:len(set.path)//2-3] + pathb = set.path[len(set.path//2):] + patha = patha[:target//2-3] + pathb = pathb[-target//2:] out += patha + '...' + pathb else: out = tst diff --git a/cpuset/commands/shield.py b/cpuset/commands/shield.py index 3aea8ce..ea57f22 100644 --- a/cpuset/commands/shield.py +++ b/cpuset/commands/shield.py @@ -4,6 +4,7 @@ from builtins import str __copyright__ = """ Copyright (C) 2007-2010 Novell Inc. +Copyright (C) 2013-2017 SUSE Author: Alex Tsariounov This program is free software; you can redistribute it and/or modify diff --git a/cpuset/config.py b/cpuset/config.py index 4231710..a18e2f2 100644 --- a/cpuset/config.py +++ b/cpuset/config.py @@ -13,6 +13,7 @@ from future import standard_library standard_library.install_aliases() __copyright__ = """ Copyright (C) 2009-2010 Novell Inc. +Copyright (C) 2013-2017 SUSE Author: Alex Tsariounov This program is free software; you can redistribute it and/or modify diff --git a/cpuset/cset.py b/cpuset/cset.py index 794a23d..cbff02b 100644 --- a/cpuset/cset.py +++ b/cpuset/cset.py @@ -7,6 +7,7 @@ from builtins import range from builtins import object __copyright__ = """ Copyright (C) 2007-2010 Novell Inc. +Copyright (C) 2013-2017 SUSE Author: Alex Tsariounov This program is free software; you can redistribute it and/or modify diff --git a/cpuset/main.py b/cpuset/main.py index 2cce087..7c9240d 100644 --- a/cpuset/main.py +++ b/cpuset/main.py @@ -8,6 +8,7 @@ standard_library.install_aliases() from builtins import str __copyright__ = """ Copyright (C) 2007-2010 Novell Inc. +Copyright (C) 2013-2017 SUSE Author: Alex Tsariounov This program is free software; you can redistribute it and/or modify diff --git a/cpuset/util.py b/cpuset/util.py index f5c6415..2ffdca6 100644 --- a/cpuset/util.py +++ b/cpuset/util.py @@ -1,14 +1,13 @@ """Utility functions """ -from __future__ import division from __future__ import print_function from builtins import chr from builtins import range -from past.utils import old_div from builtins import object __copyright__ = """ Copyright (C) 2007-2010 Novell Inc. +Copyright (C) 2013-2017 SUSE Author: Alex Tsariounov This program is free software; you can redistribute it and/or modify @@ -91,7 +90,7 @@ class ProgressBar(object): else: percentcomplete=100 - blockcount=int(old_div(percentcomplete,2)) + blockcount=percentcomplete//2 if not config.mread: if blockcount > self.blockcount: for i in range(self.blockcount,blockcount):