Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
py9p: python3 fixes for pki and 9pfs
also, «circular» import removed from pki
- Loading branch information
Peter V. Saveliev
committed
Jan 8, 2013
1 parent
1c16d66
commit 3362cb6
Showing
4 changed files
with
64 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import sys | ||
|
||
if sys.version_info[0] == 2: | ||
def bytes3(x): | ||
if isinstance(x, unicode): | ||
return bytes(x.encode('utf-8')) | ||
else: | ||
return bytes(x) | ||
else: | ||
def bytes3(x): | ||
return bytes(x, 'utf-8') | ||
|
||
|