SF.net SVN: fclient: [234] trunk/sandbox/fcp/fcp2_0_uri.py
Status: Pre-Alpha
Brought to you by:
jurner
From: <ju...@us...> - 2008-02-18 22:01:05
|
Revision: 234 http://fclient.svn.sourceforge.net/fclient/?rev=234&view=rev Author: jurner Date: 2008-02-18 14:00:55 -0800 (Mon, 18 Feb 2008) Log Message: ----------- a few fixes Modified Paths: -------------- trunk/sandbox/fcp/fcp2_0_uri.py Modified: trunk/sandbox/fcp/fcp2_0_uri.py =================================================================== --- trunk/sandbox/fcp/fcp2_0_uri.py 2008-02-18 22:00:15 UTC (rev 233) +++ trunk/sandbox/fcp/fcp2_0_uri.py 2008-02-18 22:00:55 UTC (rev 234) @@ -14,7 +14,7 @@ @return: decoded string @raise TypeError: if the string can not be decoded - @note: this function handles non-standard encoding as used by freenet (see: freenet/support/base64.java) + @note: this function handles non-standard encoding as used by freenet (see: freenet/src/support/base64.java) """ # freenet uses - for + and ~ for / altchars = '-~' @@ -31,12 +31,14 @@ # KeyType@32 bytes hash, 32 bytes encryption key, 5 bytes extra # # all byte components are base64 encoded. Freenet uses base64 without padding -# and uses the following altchars for urlsave encode: - for + and ~ for / +# along with the following altchars for urlsave encode: - for + and ~ for / # see: freenet/support/base64.java # # so a key as the user gets it to see is: # KeyType@43 bytes, 43 bytes, 7 bytes ..of [A-Za-z0-9\-~] # +# see: [freenet/src/support/base64.java] +# #*************************************************************************************** KeyPat = re.compile( r''' @@ -97,7 +99,7 @@ """Splits the uri @return: tuple(freenet-key, file-name) """ - if self.keyType() != self.KeyType.Invalid: + if self.keyType != self.KeyType.Invalid: head, sep, tail = self.uri.partition('/') return head, tail return self.uri, '' @@ -110,7 +112,8 @@ head, tail = self.split() if tail: return tail - return self.uri + return '' + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |