/usr/share/pyshared/wxglade/errors.py is in python-wxglade 0.6.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | """\
wxGlade internal exceptions
@copyright: 2012 Carsten Grohmann <mail@carstengrohmann.de>
@license: MIT (see license.txt) - THIS PROGRAM COMES WITH NO WARRANTY
"""
class WxgBaseException(Exception):
"""\
Base class for all individual wxGlade exceptions
"""
msg = None
def __str__(self):
if not self.msg:
return ""
if len(self.args) == 1:
text = self.msg % self.args[0]
else:
text = "%s: %s" % (self.msg, self.args)
return text
class WxgOutputDirectoryNotExist(WxgBaseException):
"""\
Raised if output path is not an existing directory
"""
msg = _('Output path "%s" must be an existing directory when generating'
' multiple files')
class WxgOutputDirectoryNotWritable(WxgBaseException):
"""\
Raised if the output path exists but the directory is not writable
"""
msg = _('Output path "%s" exists but the directory is not writable')
class WxgOutputPathIsDirectory(WxgBaseException):
"""\
Raised if the output path is a directory when generating a single file
"""
msg = _('Output path "%s" can not be a directory when generating a '
'single file')
|