commit ae635f065eca94098513cf5f04b47f09307be94c
Author: Radek Novacek <rnovacek(a)redhat.com>
Date: Thu Mar 13 10:29:51 2014 +0100
Hyperv: don't require uuid, it's not in python 2.4
hyperv.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/hyperv.py b/hyperv.py
index 2fcb1a3..3dc25c2 100644
--- a/hyperv.py
+++ b/hyperv.py
@@ -3,7 +3,14 @@ import sys
import httplib
import urlparse
import base64
-from uuid import uuid1
+
+try:
+ from uuid import uuid1
+except ImportError:
+ import subprocess
+ def uuid1():
+ # fallback to calling commandline uuidgen
+ return subprocess.Popen(["uuidgen"],
stdout=subprocess.PIPE).communicate()[0].strip()
# Import XML parser
try:
Show replies by date