|
Lines 937-948
class Config:
Link Here
|
| 937 |
self.parser.print_help() |
937 |
self.parser.print_help() |
| 938 |
OUT.die('You need to specify at least the application you' |
938 |
OUT.die('You need to specify at least the application you' |
| 939 |
' would like to handle!') |
939 |
' would like to handle!') |
|
|
940 |
else: |
| 941 |
return self.config.get('USER', 'pn') |
| 940 |
|
942 |
|
| 941 |
def check_version_set(self): |
943 |
def check_version_set(self): |
| 942 |
if not self.config.has_option('USER', 'pvr'): |
944 |
if not self.config.has_option('USER', 'pvr'): |
| 943 |
OUT.die('You did not specify which version to handle.\n Use "' |
945 |
OUT.die('You did not specify which version to handle.\n Use "' |
| 944 |
+ self.config.get('USER','g_myname') + |
946 |
+ self.config.get('USER','g_myname') + |
| 945 |
' --help" for usage') |
947 |
' --help" for usage') |
|
|
948 |
else: |
| 949 |
return self.config.get('USER', 'pvr') |
| 946 |
|
950 |
|
| 947 |
def split_hostname(self): |
951 |
def split_hostname(self): |
| 948 |
|
952 |
|
|
Lines 1225-1234
class Config:
Link Here
|
| 1225 |
|
1229 |
|
| 1226 |
self.__r = wrapper.get_root(self) |
1230 |
self.__r = wrapper.get_root(self) |
| 1227 |
wrapper.want_category(self) |
1231 |
wrapper.want_category(self) |
| 1228 |
self.check_package_set() |
1232 |
package = self.check_package_set() |
| 1229 |
self.check_version_set() |
1233 |
version = self.check_version_set() |
| 1230 |
self.set_vars() |
1234 |
self.set_vars() |
| 1231 |
|
1235 |
|
|
|
1236 |
webapp = package + ' ' + version |
| 1237 |
|
| 1232 |
# special case |
1238 |
# special case |
| 1233 |
# |
1239 |
# |
| 1234 |
# if a package has been specified, then chances are that they forgot |
1240 |
# if a package has been specified, then chances are that they forgot |
|
Lines 1260-1265
class Config:
Link Here
|
| 1260 |
self.config.set('USER', 'pn', old['WEB_PN']) |
1266 |
self.config.set('USER', 'pn', old['WEB_PN']) |
| 1261 |
self.config.set('USER', 'pvr', old['WEB_PVR']) |
1267 |
self.config.set('USER', 'pvr', old['WEB_PVR']) |
| 1262 |
|
1268 |
|
|
|
1269 |
old_webapp = old['WEB_PN'] + ' ' + old['WEB_PVR'] |
| 1270 |
|
| 1271 |
if not webapp == old_webapp: |
| 1272 |
OUT.die(webapp + ' does not match ' + |
| 1273 |
old_webapp + ' found in .webapp file at ' + |
| 1274 |
self.installdir() + '.') |
| 1275 |
|
| 1263 |
# we don't want to read the .webapp file if we're upgrading, |
1276 |
# we don't want to read the .webapp file if we're upgrading, |
| 1264 |
# because we've just written the *new* app's details into the file!! |
1277 |
# because we've just written the *new* app's details into the file!! |
| 1265 |
# |
1278 |
# |
| 1266 |
- |
|
|