Mercurial > hg > easyhg
comparison easyhg.py @ 458:c22cef015d73
Don't need to declare class members, it seems. One day I'll learn some Python
author | Chris Cannam |
---|---|
date | Wed, 29 Jun 2011 23:48:11 +0100 |
parents | b09d0e6214d8 |
children | ee06f9275c99 |
comparison
equal
deleted
inserted
replaced
457:b09d0e6214d8 | 458:c22cef015d73 |
---|---|
62 easyhg_authfile_imports_ok = False | 62 easyhg_authfile_imports_ok = False |
63 | 63 |
64 | 64 |
65 class EasyHgAuthStore(object): | 65 class EasyHgAuthStore(object): |
66 | 66 |
67 ui = None | |
68 | |
69 remote_url = '' | |
70 | |
71 use_auth_file = False | |
72 | |
73 auth_config = None | |
74 auth_file = '' | |
75 auth_key = '' | |
76 auth_cipher = None | |
77 | |
78 user = '' | |
79 passwd = '' | |
80 | |
81 remember = False | |
82 | |
83 def __init__(self, ui, url, user, passwd): | 67 def __init__(self, ui, url, user, passwd): |
84 | 68 |
85 self.ui = ui | 69 self.ui = ui |
86 self.remote_url = url | 70 self.remote_url = url |
87 | 71 |
91 self.auth_key = self.ui.config('easyhg', 'authkey') | 75 self.auth_key = self.ui.config('easyhg', 'authkey') |
92 self.auth_file = self.ui.config('easyhg', 'authfile') | 76 self.auth_file = self.ui.config('easyhg', 'authfile') |
93 | 77 |
94 self.use_auth_file = (easyhg_authfile_imports_ok and | 78 self.use_auth_file = (easyhg_authfile_imports_ok and |
95 self.auth_key and self.auth_file) | 79 self.auth_key and self.auth_file) |
80 | |
81 self.auth_config = None | |
82 self.auth_cipher = None | |
83 self.remember = False | |
96 | 84 |
97 if self.use_auth_file: | 85 if self.use_auth_file: |
98 self.auth_cipher = AES.new(self.auth_key, AES.MODE_CBC) | 86 self.auth_cipher = AES.new(self.auth_key, AES.MODE_CBC) |
99 self.auth_file = os.path.expanduser(self.auth_file) | 87 self.auth_file = os.path.expanduser(self.auth_file) |
100 self.load_auth_data() | 88 self.load_auth_data() |