aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/names.py
diff options
context:
space:
mode:
authorAaron Bentley <aaron.bentley@utoronto.ca>2007-07-15 12:43:30 -0400
committerAaron Bentley <aaron.bentley@utoronto.ca>2007-07-15 12:43:30 -0400
commit7969f5ec12c0107b7c799a7bf26d8c43c1615b15 (patch)
tree1d7f3f22fceabe46752fe85907bd24c40175abe2 /libbe/names.py
parent9703aefca39996f954a91f5426f193c06661e69c (diff)
parentb14962ab20d38c2a8fdaba8ecde55174141891a5 (diff)
downloadbugseverywhere-7969f5ec12c0107b7c799a7bf26d8c43c1615b15.tar.gz
Merge from panometrics
Diffstat (limited to 'libbe/names.py')
-rw-r--r--libbe/names.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/libbe/names.py b/libbe/names.py
index cbcfbf8..d2e077a 100644
--- a/libbe/names.py
+++ b/libbe/names.py
@@ -14,13 +14,21 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-import commands
+
import os
import sys
def uuid():
- return commands.getoutput('uuidgen')
+ # this code borrowed from standard commands module
+ # but adapted to win32
+ pipe = os.popen('uuidgen', 'r')
+ text = pipe.read()
+ sts = pipe.close()
+ if sts not in (0, None):
+ raise "Failed to run uuidgen"
+ if text[-1:] == '\n': text = text[:-1]
+ return text
def creator():
if sys.platform != "win32":