| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -165,12 +165,12 @@ def main(): | |||
| 165 | 165 | if args.fields: | |
| 166 | 166 | fields = [x.strip() for x in args.fields.split(',')] | |
| 167 | 167 | debug = args.debug | |
| 168 | - action = args.action | ||
| 168 | + action = args.whaction | ||
| 169 | 169 | what = args.what | |
| 170 | 170 | ||
| 171 | 171 | args = args.__dict__ | |
| 172 | 172 | # Remove CLI behavior-related args | |
| 173 | - for item in ('gitlab', 'config_file', 'verbose', 'debug', 'what', 'action', | ||
| 173 | + for item in ('gitlab', 'config_file', 'verbose', 'debug', 'what', 'whaction', | ||
| 174 | 174 | 'version', 'output'): | |
| 175 | 175 | args.pop(item) | |
| 176 | 176 | args = {k: _parse_value(v) for k, v in args.items() if v is not None} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -111,7 +111,7 @@ def test_parse_args(self): | |||
| 111 | 111 | parser = cli._get_parser(gitlab.v4.cli) | |
| 112 | 112 | args = parser.parse_args(['project', 'list']) | |
| 113 | 113 | self.assertEqual(args.what, 'project') | |
| 114 | - self.assertEqual(args.action, 'list') | ||
| 114 | + self.assertEqual(args.whaction, 'list') | ||
| 115 | 115 | ||
| 116 | 116 | def test_parser(self): | |
| 117 | 117 | parser = cli._get_parser(gitlab.v4.cli) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -273,7 +273,7 @@ def extend_parser(parser): | |||
| 273 | 273 | ||
| 274 | 274 | object_subparsers = object_group.add_subparsers( | |
| 275 | 275 | title='action', | |
| 276 | - dest='action', help="Action to execute.") | ||
| 276 | + dest='whaction', help="Action to execute.") | ||
| 277 | 277 | _populate_sub_parser_by_class(cls, object_subparsers) | |
| 278 | 278 | object_subparsers.required = True | |
| 279 | 279 | ||
@@ -357,7 +357,7 @@ def display_dict(d, padding): | |||
| 357 | 357 | id = getattr(obj, obj._id_attr) | |
| 358 | 358 | print('%s: %s' % (obj._id_attr.replace('_', '-'), id)) | |
| 359 | 359 | if hasattr(obj, '_short_print_attr'): | |
| 360 | - value = getattr(obj, obj._short_print_attr) | ||
| 360 | + value = getattr(obj, obj._short_print_attr) or 'None' | ||
| 361 | 361 | value = value.replace('\r', '').replace('\n', ' ') | |
| 362 | 362 | # If the attribute is a note (ProjectCommitComment) then we do | |
| 363 | 363 | # some modifications to fit everything on one line | |
| Back | FazBrowse Home | New Git URL |
0 commit comments