SF.net SVN: fclient: [161] trunk/sandbox/fcp/fcp2_0_params.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <ju...@us...> - 2008-02-06 11:13:02
|
Revision: 161
http://fclient.svn.sourceforge.net/fclient/?rev=161&view=rev
Author: jurner
Date: 2008-02-06 03:13:03 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
kicked out identifier prefixes. Use FcRequestType now
Modified Paths:
--------------
trunk/sandbox/fcp/fcp2_0_params.py
Modified: trunk/sandbox/fcp/fcp2_0_params.py
===================================================================
--- trunk/sandbox/fcp/fcp2_0_params.py 2008-02-06 11:12:36 UTC (rev 160)
+++ trunk/sandbox/fcp/fcp2_0_params.py 2008-02-06 11:13:03 UTC (rev 161)
@@ -60,7 +60,7 @@
MAGIC = '{8a7808d0-3934-465a-b1b4-b7150ed109a5}' # magic string to identify our requests
FcParams = (
- ('FcType', validateInt),
+ ('FcRequestType', validateInt),
('FcInitTime', validateFloat), # can not take it from uuid cos requests may be resend multiple times
('FcFilenameCollision', validateInt),
('FcPersistentUserData', validateString),
@@ -132,19 +132,16 @@
-def newUuid(prefix=None, uuids=None):
+def newUuid(uuids=None):
"""Creates a new unique identifier
- @param prefix: (str) identifier prefix or None
@param uuids: if desired any iterable containing uuids to enshure the identifier is unique in the iterable
@return: (str) uuid
"""
- if prefix is None:
- prefix = ''
- uuid_ = prefix + uuid.uuid_time()
+ uuid_ = uuid.uuid_time()
if uuids is not None:
while uuid_ in uuids:
- uuid_ = prefix + uuid_time()
+ uuid_ = uuid_time()
return uuid_
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|