Skip to content

Commit 342be6f

Browse files
committed
[processing] use hex representation of uuid
(cherry picked from commit 2466083)
1 parent 6e5dc9a commit 342be6f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/plugins/processing/tools/system.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def userFolder():
4646

4747

4848
def defaultOutputFolder():
49-
folder = os.path.join(userFolder(), "outputs")
49+
folder = os.path.join(userFolder(), 'outputs')
5050
if not QDir(folder).exists():
5151
QDir().mkpath(folder)
5252

@@ -60,7 +60,7 @@ def isWindows():
6060
def isMac():
6161
return sys.platform == 'darwin'
6262

63-
_tempFolderSuffix = unicode(uuid.uuid4()).replace('-', '')
63+
_tempFolderSuffix = uuid.uuid4().hex
6464

6565

6666
def tempFolder():
@@ -96,7 +96,7 @@ def getTempFilenameInTempFolder(basename):
9696
"""
9797

9898
path = tempFolder()
99-
path = os.path.join(path, unicode(uuid.uuid4()).replace('-', ''))
99+
path = os.path.join(path, uuid.uuid4().hex)
100100
mkdir(path)
101101
basename = removeInvalidChars(basename)
102102
filename = os.path.join(path, basename)
@@ -108,7 +108,7 @@ def getTempDirInTempFolder():
108108
"""
109109

110110
path = tempFolder()
111-
path = os.path.join(path, unicode(uuid.uuid4()).replace('-', ''))
111+
path = os.path.join(path, uuid.uuid4().hex)
112112
mkdir(path)
113113
return path
114114

0 commit comments

Comments
 (0)