Revision: 4079 Author: misza13 Date: 2007-08-19 20:29:42 +0000 (Sun, 19 Aug 2007)
Log Message: ----------- If signature filename is not specified, raise an exception rather than exit() abruptly.
Modified Paths: -------------- trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py =================================================================== --- trunk/pywikipedia/welcome.py 2007-08-19 19:57:38 UTC (rev 4078) +++ trunk/pywikipedia/welcome.py 2007-08-19 20:29:42 UTC (rev 4079) @@ -318,6 +318,9 @@ ############################################################################ ############################################################################
+class FilenameNotSet(wikipedia.Error): + """An exception indicating that a signature filename was not specifed.""" + # Function stolen from wikipedia.py and modified def urlname(talk_page, site): """The name of the page this Page refers to, in a form suitable @@ -446,7 +449,7 @@ else: if fileSignName == None: wikipedia.output(u'Error! - No fileName!') - exit() + raise FilenameNotSet("No signature filename specified.") try: f = codecs.open(wikipediatools.absoluteFilename(fileSignName), 'r', encoding = config.console_encoding) except: