Corrected all docstring warnings sphinx shows.
Details
Details
Diff Detail
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Lint Skipped - Unit
Unit Tests Skipped
kparal |
Corrected all docstring warnings sphinx shows.
make clean html in docs/
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | libtaskotron/check.py (2 lines) | |||
M | libtaskotron/file_utils.py (8 lines) |
Commit | Tree | Parents | Author | Summary | Date |
---|---|---|---|---|---|
8096c7618ef0 | 2bae13c186dc | 0403083f9278 | Garret Raziel | correct docstrings (Show More…) | Jul 31 2014, 12:25 PM |
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Line(s) | 233 | class ReportType(object): | |||
---|---|---|---|---|---|
236 | KOJI_BUILD = 'koji_build' #: | 236 | KOJI_BUILD = 'koji_build' #: | ||
237 | BODHI_UPDATE = 'bodhi_update' #: | 237 | BODHI_UPDATE = 'bodhi_update' #: | ||
238 | YUM_REPOSITORY = 'yum_repository' #: | 238 | YUM_REPOSITORY = 'yum_repository' #: | ||
239 | 239 | | |||
240 | 240 | | |||
241 | def export_TAP(check_details, checkname="$CHECKNAME"): | 241 | def export_TAP(check_details, checkname="$CHECKNAME"): | ||
242 | '''Generate TAP output used for reporting to ResultsDB. | 242 | '''Generate TAP output used for reporting to ResultsDB. | ||
243 | 243 | | |||
244 | Note: You need to provide all your :class:`CheckDetail`s in a single pass | 244 | Note: You need to provide all your :class:`CheckDetail`\s in a single pass | ||
245 | in order to generate a valid TAP output. You can't call this method several | 245 | in order to generate a valid TAP output. You can't call this method several | ||
246 | times and then simply join the outputs simply as strings. | 246 | times and then simply join the outputs simply as strings. | ||
247 | 247 | | |||
248 | :param check_details: iterable of :class:`CheckDetail` instances or single | 248 | :param check_details: iterable of :class:`CheckDetail` instances or single | ||
249 | instance of :class:`CheckDetail` | 249 | instance of :class:`CheckDetail` | ||
250 | :param str checkname: name of the executed check | 250 | :param str checkname: name of the executed check | ||
251 | :return: TAP output with results for every :class:`CheckDetail` instance | 251 | :return: TAP output with results for every :class:`CheckDetail` instance | ||
252 | provided | 252 | provided | ||
▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines |
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 35 | def get_urlgrabber(**kwargs): | |||
---|---|---|---|---|---|
55 | 55 | | |||
56 | return grabber | 56 | return grabber | ||
57 | 57 | | |||
58 | 58 | | |||
59 | def download(url, dirname, filename=None, overwrite=False, grabber=None): | 59 | def download(url, dirname, filename=None, overwrite=False, grabber=None): | ||
60 | '''Download a file. | 60 | '''Download a file. | ||
61 | 61 | | |||
62 | :param str url: file URL to download | 62 | :param str url: file URL to download | ||
63 | :param str dirname directory path, if the directory does not exist, it gets | 63 | :param str dirname: directory path, if the directory does not exist, it gets | ||
64 | created (and all its parent directories). | 64 | created (and all its parent directories). | ||
65 | :param str filename name of downloaded file, if not provided basename is | 65 | :param str filename: name of downloaded file, if not provided basename is | ||
66 | extracted from URL | 66 | extracted from URL | ||
67 | :param bool overwrite: if the destination file already exists, whether to | 67 | :param bool overwrite: if the destination file already exists, whether to | ||
68 | overwrite or not. If ``False``, a simple check is | 68 | overwrite or not. If ``False``, a simple check is | ||
69 | performed whether the remote file is the same as the | 69 | performed whether the remote file is the same as the | ||
70 | local file and re-downloads it anyway if they are not | 70 | local file and re-downloads it anyway if they are not | ||
71 | the same. | 71 | the same. | ||
72 | :param grabber: custom :class:`urlgrabber.grabber.URLGrabber` instance to be | 72 | :param grabber: custom :class:`urlgrabber.grabber.URLGrabber` instance to be | ||
73 | used for actual downloading | 73 | used for actual downloading | ||
74 | :return: file path of the downloaded file | 74 | :return: file path of the downloaded file | ||
Show All 37 Lines | 109 | except urlgrabber.grabber.URLGrabError, e: | |||
112 | if os.path.exists(dest): | 112 | if os.path.exists(dest): | ||
113 | try: | 113 | try: | ||
114 | os.remove(dest) | 114 | os.remove(dest) | ||
115 | except OSError, e: | 115 | except OSError, e: | ||
116 | log.exception('Could not delete incomplete file: %s', dest) | 116 | log.exception('Could not delete incomplete file: %s', dest) | ||
117 | raise TaskotronRemoteError(e) | 117 | raise TaskotronRemoteError(e) | ||
118 | 118 | | |||
119 | return dest | 119 | return dest | ||
120 | No newline at end of file | 120 | No newline at end of file |