Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(11)  |  Derive(0)  |  Import(1)
Exception raised for an error that should be reported to the user
along with a usage message.

src/m/i/mixminion-HEAD/lib/mixminion/ClientMain.py   mixminion(Download)
import mixminion.MMTPClient
 
from mixminion.Common import LOG, Lockfile, LockfileLocked, MixError, \
     MixFatalError, MixProtocolBadAuth, MixProtocolError, STATUS, UIError, \
     UsageError, createPrivateDir, englishSequence, floorDiv, formatTime, \
            if o in ignoreOptions: continue
            if o in ('-h', '--help'):
                raise UsageError()
            elif o in ('-f', '--config'):
                self.configFile = v
                    self.exitAddress = mixminion.ClientDirectory.parseAddress(v)
                except ParseError, e:
                    raise UsageError(str(e))
            elif o in ('-R', '--reply-block'):
                #assert wantForwardPath #XXXX008 re-enable, sanely
                    self.lifetime = int(v)
                except ValueError:
                    raise UsageError("%s expects an integer"%o)
            elif o in ('--passphrase-fd',):
                try:
                    self.password_fileno = int(v)
                except ValueError:
                    raise UsageError("%s expects an integer"%o)