aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2015-07-19 03:50:08 +0200
committerVG <vg@devys.org>2015-07-19 03:50:08 +0200
commit3cbf206e350635ac1849f4b9fa519c04ad993dda (patch)
treee3b8d50e0b1725e9299647e5bb10fa1ae8b98162
parent6f1ef76174f7cc5de369b45c203a5e5001cdf1c3 (diff)
downloaduuidxer-3cbf206e350635ac1849f4b9fa519c04ad993dda.tar.gz
uuidxer-3cbf206e350635ac1849f4b9fa519c04ad993dda.tar.bz2
uuidxer-3cbf206e350635ac1849f4b9fa519c04ad993dda.zip
fix hostname for old python 3.2
-rwxr-xr-xscan.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scan.py b/scan.py
index 7432cef..cfae385 100755
--- a/scan.py
+++ b/scan.py
@@ -14,7 +14,7 @@ orig_hostname: {hostname}
'''
-def create_uuid_txt(root, hostname=os.uname().nodename):
+def create_uuid_txt(root, hostname=os.uname()[1]):
my_uuid = str(uuid.uuid4())
with open(os.path.join(root, 'uuid.txt'), 'w') as out:
out.write(uuid_msg.format(uuid=my_uuid,