class documentation
class Uscan(object):
Undocumented
Method | __init__ |
Undocumented |
Method | scan |
Invoke uscan to fetch a new upstream version |
Class Variable | cmd |
Undocumented |
Property | tarball |
Undocumented |
Property | uptodate |
Undocumented |
Method | _parse |
Parse the uscan output and update the object's properties |
Method | _parse |
Check if the uscan reports that we're up to date. |
Method | _raise |
Parse the uscan output for errors and warnings and raise a UscanError exception based on this. If no error detail is found a generic error message is used. |
Instance Variable | _dir |
Undocumented |
Instance Variable | _tarball |
Undocumented |
Instance Variable | _uptodate |
Undocumented |
Parse the uscan output and update the object's properties
Parameters | |
out: string >>> u = Uscan('http://example.com/') >>> u._parse('<target>virt-viewer_0.4.0.orig.tar.gz</target>') >>> u.tarball '../virt-viewer_0.4.0.orig.tar.gz' >>> u.uptodate False >>> u._parse('') Traceback (most recent call last): ... gbp.deb.uscan.UscanError: Couldn't find source in uscan output | uscan output |
Check if the uscan reports that we're up to date.
Parameters | |
out:string | uscan output |
Returns | |
True if package is uptodate >>> u = Uscan('http://example.com/') >>> u._parse_uptodate('<status>up to date</status>') True >>> u.tarball >>> u.uptodate True >>> u._parse_uptodate('') False >>> u.tarball >>> u.uptodate False |
Parse the uscan output for errors and warnings and raise a UscanError
exception based on this. If no error detail is found a generic error message is used.
Parameters | |
out:string | uscan output |
Raises | |
UscanError | exception raised >>> u = Uscan('http://example.com/') >>> u._raise_error("<warnings>uscan warning: " ... "In watchfile debian/watch, reading webpage\n" ... "http://a.b/ failed: 500 Cant connect " ... "to example.com:80 (Bad hostname)</warnings>") Traceback (most recent call last): ... gbp.deb.uscan.UscanError: Uscan failed: uscan warning: In watchfile debian/watch, reading webpage http://a.b/ failed: 500 Cant connect to example.com:80 (Bad hostname) >>> u._raise_error("<errors>uscan: Can't use --verbose if " ... "you're using --dehs!</errors>") Traceback (most recent call last): ... gbp.deb.uscan.UscanError: Uscan failed: uscan: Can't use --verbose if you're using --dehs! >>> u = u._raise_error('') Traceback (most recent call last): ... gbp.deb.uscan.UscanError: Uscan failed - debug by running 'uscan --verbose' |