Skip to content

Commit

Permalink
AttributeError is thrown when os.getlogin() is called on an OS that d…
Browse files Browse the repository at this point in the history
…oesn't support it (win*, symbian for example). This handles it and doesn't error out.
  • Loading branch information
yaleman committed Nov 22, 2011
1 parent 6989edd commit a1fa0c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pythontwitter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3108,7 +3108,7 @@ def _GetUsername(self):
os.getenv('USERNAME') or \
os.getlogin() or \
'nobody'
except (IOError, OSError), e:
except (AttributeError, IOError, OSError), e:
return 'nobody'

def _GetTmpCachePath(self):
Expand Down

0 comments on commit a1fa0c3

Please sign in to comment.