Skip to content

Commit bdf5268

Browse files
committed
CP-49148: More clean python2 code
- Update following embeded shellbang to python3 * generate-iscsi-iqn * xe-backup-metadata * xe-restore-metadata - Remove interop-test.sh as not used Signed-off-by: Lin Liu <[email protected]>
1 parent 2f9e969 commit bdf5268

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

ocaml/message-switch/core_test/interop-test.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

scripts/generate-iscsi-iqn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ geniqn() {
3636
domain=${defaultdomain}
3737
fi
3838

39-
revdomain=$(python -c "${REVERSE_PY}" $domain)
39+
revdomain=$(python3 -c "${REVERSE_PY}" $domain)
4040

4141
uuid=$(uuidgen | cut -d- -f1)
4242
date=$(date +"%Y-%m")

scripts/xe-backup-metadata

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function usage {
5151
function uuid5 {
5252
# could use a modern uuidgen but it's not on XS 8
5353
# should work with Python 2 and 3
54-
python -c "import uuid; print (uuid.uuid5(uuid.UUID('$1'), '$2'))"
54+
python3 -c "import uuid; print (uuid.uuid5(uuid.UUID('$1'), '$2'))"
5555
}
5656

5757
function test_sr {

scripts/xe-restore-metadata

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function test_sr {
6565
NS="e93e0639-2bdb-4a59-8b46-352b3f408c19"
6666
function uuid5 {
6767
# could use a modern uuidgen but it's not on XS 8
68-
python -c "import uuid; print (uuid.uuid5(uuid.UUID('$1'), '$2'))"
68+
python3 -c "import uuid; print (uuid.uuid5(uuid.UUID('$1'), '$2'))"
6969
}
7070

7171
dry_run=0

0 commit comments

Comments
 (0)