- Timestamp:
- 01/15/05 12:28:54 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykoticon/trunk/bin/pykoticon
r59 r60 152 152 """Retrieves the user account and quota information.""" 153 153 info = self.getUserInfo(username) 154 quotas = self.getUserPQuotas(username) 155 return User(username, info, quotas) 156 157 def getWindowsUserName() : 158 """Retrieves the current user's name under MS Windows.""" 159 return win32api.GetUserName() 154 if info : 155 quotas = self.getUserPQuotas(username) 156 return User(username, info, quotas) 160 157 161 158 class PyKotIcon(wxPython.wx.wxFrame): … … 255 252 def test() : 256 253 """Runs in test mode (console).""" 257 username = getWindowsUserName() 254 if len(sys.argv) >= 3 : 255 username = sys.argv[2] 256 else : 257 username = win32api.GetUserName() 258 258 net = CGINetworkInterface(DUMPYKOTA_URL) 259 259 user = net.getUser(username) … … 270 270 271 271 if __name__ == '__main__': 272 if (len(sys.argv) == 2) and (sys.argv[1] == "--test") :272 if (len(sys.argv) >= 2) and (sys.argv[1] == "--test") : 273 273 test() 274 274 else :