Sandro Bonazzola has posted comments on this change.

Change subject: command: allow --help and --version as unprivileged user
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/24424/1/src/__main__.py
File src/__main__.py:

Line 1326:     elif os.geteuid() != 0:
Line 1327:         print ('This tool requires root permissions to run.')
Line 1328:         sys.exit(ExitCodes.CRITICAL)
Line 1329:     else:
Line 1330:         setup_pg_defaults()
> Why else?
setup_pg_defaults() requires root access to the config files.
Line 1331: 
Line 1332:     def comma_separated_list(option, opt_str, value, parser):
Line 1333:         setattr(
Line 1334:             parser.values, option.dest, [v.strip() for v in 
value.split(",")]


Line 1601: 
Line 1602:     parser.add_option_group(engine_group)
Line 1603:     parser.add_option_group(ssh_group)
Line 1604:     parser.add_option_group(db_group)
Line 1605:     parser.parse_args()
> I don't understand how it worked so far without this line...
it's called later. this line just allow to exit with --version and --help at 
this point.
Line 1606: 
Line 1607:     try:
Line 1608:         conf = Configuration(parser)
Line 1609:         if not conf.get('pg_pass') and pg_pass:


-- 
To view, visit http://gerrit.ovirt.org/24424
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I79d48d69409494156799ef5a2bd8965ef000e3b5
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-log-collector
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Keith Robertson <[email protected]>
Gerrit-Reviewer: Kiril Nesenko <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to