removed usage of longs, updated int instance checking and octal constants to be 2/3 compliant

This commit is contained in:
bharnden 2019-05-05 17:11:07 -07:00
parent 5b7453b906
commit 8d6bf54a16
11 changed files with 27 additions and 25 deletions

View file

@ -234,12 +234,12 @@ class PhysicalNode(CoreNodeBase):
dirname = dirname.replace("/", ".")
dirname = os.path.join(self.nodedir, dirname)
if not os.path.isdir(dirname):
os.makedirs(dirname, mode=0755)
os.makedirs(dirname, mode=0o755)
hostfilename = os.path.join(dirname, basename)
return open(hostfilename, mode)
def nodefile(self, filename, contents, mode=0644):
def nodefile(self, filename, contents, mode=0o644):
with self.opennodefile(filename, "w") as node_file:
node_file.write(contents)
os.chmod(node_file.name, mode)