src/p/y/pygobject-HEAD/glib/option.py pygobject(Download)
import sys
import optparse
from optparse import OptParseError, OptionError, OptionValueError, \
BadOptionError, OptionConflictError
if sys.version_info >= (3, 0):
elif error.code == _glib.OPTION_ERROR_UNKNOWN_OPTION:
raise BadOptionError(error.message)
elif error.code == _glib.OPTION_ERROR_FAILED:
raise OptParseError(error.message)
else:
raise
src/m/o/moofs-HEAD/moofs/src/fuseparts/subbedopts.py moofs(Download)
# See the file COPYING. # from optparse import Option, OptionParser, OptParseError, OptionConflictError from optparse import HelpFormatter, IndentedHelpFormatter, SUPPRESS_HELP from fuseparts.setcompatwrap import set
def add_option(self, *args, **kwargs):
if 'action' in kwargs and kwargs['action'] == 'store_hive':
if 'subopt' in kwargs:
raise OptParseError(
"""option can't have a `subopt' attr and `action="store_hive"' at the same time""")
if not 'type' in kwargs:
kwargs['type'] = 'string'
src/a/l/allmydata-tahoe-1.8.0/mac/fuseparts/subbedopts.py allmydata-tahoe(Download)
# licensed under the same terms as Tahoe-LAFS itself. # from optparse import Option, OptionParser, OptParseError, OptionConflictError from optparse import HelpFormatter, IndentedHelpFormatter, SUPPRESS_HELP from fuseparts.setcompatwrap import set
def add_option(self, *args, **kwargs):
if 'action' in kwargs and kwargs['action'] == 'store_hive':
if 'subopt' in kwargs:
raise OptParseError(
"""option can't have a `subopt' attr and `action="store_hive"' at the same time""")
if not 'type' in kwargs:
kwargs['type'] = 'string'
src/f/u/fuse-python-0.2/fuseparts/subbedopts.py fuse-python(Download)
# See the file COPYING. # from optparse import Option, OptionParser, OptParseError, OptionConflictError from optparse import HelpFormatter, IndentedHelpFormatter, SUPPRESS_HELP from fuseparts.setcompatwrap import set
def add_option(self, *args, **kwargs):
if 'action' in kwargs and kwargs['action'] == 'store_hive':
if 'subopt' in kwargs:
raise OptParseError(
"""option can't have a `subopt' attr and `action="store_hive"' at the same time""")
if not 'type' in kwargs:
kwargs['type'] = 'string'
src/i/m/imap-upload-HEAD/trunk/imap_upload.py imap-upload(Download)
def error(self, msg):
raise optparse.OptParseError(self.get_usage() + "\n" + msg)
def si_prefix(n, prefixes=("", "k", "M", "G", "T", "P", "E", "Z", "Y"),
block=1024, threshold=1):
"""Get SI prefix and reduced number."""
src/a/p/applib-HEAD/applib/_cmdln.py applib(Download)
def error(self, msg):
raise optparse.OptParseError(msg)
def exit(self, status=0, msg=None):
if status == 0:
raise StopOptionProcessing(msg)
else:
#TODO: don't lose status info here
raise optparse.OptParseError(msg)
src/i/m/imap-upload-HEAD/imap_upload.py imap-upload(Download)
def error(self, msg):
raise optparse.OptParseError(self.get_usage() + "\n" + msg)
def si_prefix(n, prefixes=("", "k", "M", "G", "T", "P", "E", "Z", "Y"),
block=1024, threshold=1):
"""Get SI prefix and reduced number."""
src/y/t/yt-1.7/yt/cmdln.py yt(Download)
def error(self, msg):
raise optparse.OptParseError(msg)
def exit(self, status=0, msg=None):
if status == 0:
raise StopOptionProcessing(msg)
else:
#TODO: don't lose status info here
raise optparse.OptParseError(msg)
src/c/m/cmdln-1.1.2/lib/cmdln.py cmdln(Download)
def error(self, msg):
raise optparse.OptParseError(msg)
def exit(self, status=0, msg=None):
if status == 0:
raise StopOptionProcessing(msg)
else:
#TODO: don't lose status info here
raise optparse.OptParseError(msg)
src/a/p/applib-1.0.1/applib/_cmdln.py applib(Download)
def error(self, msg):
raise optparse.OptParseError(msg)
def exit(self, status=0, msg=None):
if status == 0:
raise StopOptionProcessing(msg)
else:
#TODO: don't lose status info here
raise optparse.OptParseError(msg)
1 | 2 Next