Dan Kenigsberg has posted comments on this change.
Change subject: Fix vdsClient relative import woes.
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(3 inline comments)
....................................................
File vdsm_cli/vdsClient.in
Line 1: #!/bin/sh
Line 2:
Line 3: if [ -z $PYTHONPATH ]; then
never use unquoted variables in bash, unless with a very good reason.
Line 4: PYTHONPATH="@VDSMDIR@" python -m vdsClient "$@"
Line 5: else
Line 6: PYTHONPATH="@VDSMDIR@:$PYTHONPATH" python -m vdsClient "$@"
Line 1: #!/bin/sh
Line 2:
Line 3: if [ -z $PYTHONPATH ]; then
Line 4: PYTHONPATH="@VDSMDIR@" python -m vdsClient "$@"
Line 5: else
heh I think that it would be simpler to have
[ -n "$PYTHONPATH" ] && x=":$PYTHONPATH"
PYTHONPATH="@VDSMDIR@$x" python -m vdsClient "$@"
with a better name for x.
Line 6: PYTHONPATH="@VDSMDIR@:$PYTHONPATH" python -m vdsClient "$@"
....................................................
File vdsm_cli/vdsClient.py
Line 24: import re
Line 25: import socket
Line 26: import pprint as pp
Line 27:
Line 28: if '' in sys.path:
I the change in this file really required?
I think that playing with sys.path is a bit rude. what if someone really wanted
it?
Line 29: sys.path.remove('')
Line 30: from vdsm import vdscli
Line 31: try:
Line 32: import vdsClientGluster as ge
--
To view, visit http://gerrit.ovirt.org/8662
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Icd4b19b39d6a529543be3de5b3871ecb85edc992
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches