From 94552ac9a2f684e86a2fde669072b26a7dbaaf6f Mon Sep 17 00:00:00 2001 From: joshuaboud Date: Thu, 15 Jul 2021 14:05:34 -0300 Subject: [PATCH] rename scripts from *.py to *.py3 --- navigator/components/FileUpload.js | 4 ++-- navigator/components/NavContextMenu.js | 2 +- navigator/components/NavDir.js | 4 ++-- navigator/components/NavDragDrop.js | 2 +- navigator/components/NavWindow.js | 4 ++-- .../scripts/{cephfs-dir-stats.py => cephfs-dir-stats.py3} | 0 navigator/scripts/{fail-if-exists.py => fail-if-exists.py3} | 0 navigator/scripts/{ls.py => ls.py3} | 0 navigator/scripts/{paste.py => paste.py3} | 2 +- navigator/scripts/{touch.py => touch.py3} | 0 navigator/scripts/{write-chunks.py => write-chunks.py3} | 2 +- .../scripts/{zip-for-download.py => zip-for-download.py3} | 2 +- packaging/el7/main.spec | 1 - 13 files changed, 11 insertions(+), 12 deletions(-) rename navigator/scripts/{cephfs-dir-stats.py => cephfs-dir-stats.py3} (100%) rename navigator/scripts/{fail-if-exists.py => fail-if-exists.py3} (100%) rename navigator/scripts/{ls.py => ls.py3} (100%) rename navigator/scripts/{paste.py => paste.py3} (97%) rename navigator/scripts/{touch.py => touch.py3} (100%) rename navigator/scripts/{write-chunks.py => write-chunks.py3} (96%) rename navigator/scripts/{zip-for-download.py => zip-for-download.py3} (97%) diff --git a/navigator/components/FileUpload.js b/navigator/components/FileUpload.js index 836d4d7..424ad77 100644 --- a/navigator/components/FileUpload.js +++ b/navigator/components/FileUpload.js @@ -25,7 +25,7 @@ export class FileUpload { check_if_exists() { return new Promise((resolve, reject) => { - var proc = cockpit.spawn(["/usr/share/cockpit/navigator/scripts/fail-if-exists.py", this.path], {superuser: "try"}); + var proc = cockpit.spawn(["/usr/share/cockpit/navigator/scripts/fail-if-exists.py3", this.path], {superuser: "try"}); proc.done((data) => {resolve(false)}); proc.fail((e, data) => {resolve(true)}); }); @@ -96,7 +96,7 @@ export class FileUpload { return; } this.make_html_element(); - this.proc = cockpit.spawn(["/usr/share/cockpit/navigator/scripts/write-chunks.py", this.path], {err: "out", superuser: "try"}); + this.proc = cockpit.spawn(["/usr/share/cockpit/navigator/scripts/write-chunks.py3", this.path], {err: "out", superuser: "try"}); this.proc.fail((e, data) => { this.reader.onload = () => {} this.done(); diff --git a/navigator/components/NavContextMenu.js b/navigator/components/NavContextMenu.js index 59aff55..ad27e2b 100644 --- a/navigator/components/NavContextMenu.js +++ b/navigator/components/NavContextMenu.js @@ -99,7 +99,7 @@ export class NavContextMenu { zip_for_download() { return new Promise((resolve, reject) => { var cmd = [ - "/usr/share/cockpit/navigator/scripts/zip-for-download.py", + "/usr/share/cockpit/navigator/scripts/zip-for-download.py3", this.nav_window_ref.pwd().path_str() ]; for (let entry of this.nav_window_ref.selected_entries) { diff --git a/navigator/components/NavDir.js b/navigator/components/NavDir.js index 3aa2e40..f55b2d6 100644 --- a/navigator/components/NavDir.js +++ b/navigator/components/NavDir.js @@ -49,7 +49,7 @@ export class NavDir extends NavEntry { return new Promise(async (resolve, reject) => { var children = []; var proc = cockpit.spawn( - ["/usr/share/cockpit/navigator/scripts/ls.py", this.path_str()], + ["/usr/share/cockpit/navigator/scripts/ls.py3", this.path_str()], {err:"out", superuser: "try"} ); proc.fail((e, data) => { @@ -139,7 +139,7 @@ export class NavDir extends NavEntry { async cephfs_dir_stats() { try { var proc = await cockpit.spawn( - ["/usr/share/cockpit/navigator/scripts/cephfs-dir-stats.py", "-j", this.path_str()], + ["/usr/share/cockpit/navigator/scripts/cephfs-dir-stats.py3", "-j", this.path_str()], {err: "ignore"} ); return JSON.parse(proc)[0]; diff --git a/navigator/components/NavDragDrop.js b/navigator/components/NavDragDrop.js index 6712808..d29ce55 100644 --- a/navigator/components/NavDragDrop.js +++ b/navigator/components/NavDragDrop.js @@ -38,7 +38,7 @@ export class NavDragDrop { } if (file.size === 0) { var proc = cockpit.spawn( - ["/usr/share/cockpit/navigator/scripts/touch.py", this.nav_window_ref.pwd().path_str() + "/" + file.name], + ["/usr/share/cockpit/navigator/scripts/touch.py3", this.nav_window_ref.pwd().path_str() + "/" + file.name], {superuser: "try", err: "out"} ); proc.done(() => { diff --git a/navigator/components/NavWindow.js b/navigator/components/NavWindow.js index 0326790..a88cc1d 100644 --- a/navigator/components/NavWindow.js +++ b/navigator/components/NavWindow.js @@ -455,7 +455,7 @@ export class NavWindow { } var promise = new Promise((resolve, reject) => { var proc = cockpit.spawn( - ["/usr/share/cockpit/navigator/scripts/touch.py", this.pwd().path_str() + "/" + new_file_name], + ["/usr/share/cockpit/navigator/scripts/touch.py3", this.pwd().path_str() + "/" + new_file_name], {superuser: "try", err: "out"} ); proc.done((data) => { @@ -545,7 +545,7 @@ export class NavWindow { async paste_clipboard() { this.start_load(); - var cmd = ["/usr/share/cockpit/navigator/scripts/paste.py"]; + var cmd = ["/usr/share/cockpit/navigator/scripts/paste.py3"]; var dest = this.pwd().path_str(); if (this.copy_or_move === "move") { cmd.push("-m"); diff --git a/navigator/scripts/cephfs-dir-stats.py b/navigator/scripts/cephfs-dir-stats.py3 similarity index 100% rename from navigator/scripts/cephfs-dir-stats.py rename to navigator/scripts/cephfs-dir-stats.py3 diff --git a/navigator/scripts/fail-if-exists.py b/navigator/scripts/fail-if-exists.py3 similarity index 100% rename from navigator/scripts/fail-if-exists.py rename to navigator/scripts/fail-if-exists.py3 diff --git a/navigator/scripts/ls.py b/navigator/scripts/ls.py3 similarity index 100% rename from navigator/scripts/ls.py rename to navigator/scripts/ls.py3 diff --git a/navigator/scripts/paste.py b/navigator/scripts/paste.py3 similarity index 97% rename from navigator/scripts/paste.py rename to navigator/scripts/paste.py3 index beae6be..77ac86e 100755 --- a/navigator/scripts/paste.py +++ b/navigator/scripts/paste.py3 @@ -18,7 +18,7 @@ """ """ -Synopsis: `paste.py [-m] ` +Synopsis: `paste.py3 [-m] ` all full paths """ diff --git a/navigator/scripts/touch.py b/navigator/scripts/touch.py3 similarity index 100% rename from navigator/scripts/touch.py rename to navigator/scripts/touch.py3 diff --git a/navigator/scripts/write-chunks.py b/navigator/scripts/write-chunks.py3 similarity index 96% rename from navigator/scripts/write-chunks.py rename to navigator/scripts/write-chunks.py3 index 1c06593..8beaf37 100755 --- a/navigator/scripts/write-chunks.py +++ b/navigator/scripts/write-chunks.py3 @@ -18,7 +18,7 @@ """ """ -Synopsis: `write-chunks.py ` +Synopsis: `write-chunks.py3 ` JSON objects are of form: obj = { seek: diff --git a/navigator/scripts/zip-for-download.py b/navigator/scripts/zip-for-download.py3 similarity index 97% rename from navigator/scripts/zip-for-download.py rename to navigator/scripts/zip-for-download.py3 index 5f312cc..efc7f55 100755 --- a/navigator/scripts/zip-for-download.py +++ b/navigator/scripts/zip-for-download.py3 @@ -18,7 +18,7 @@ """ """ -Synopsis: `zip-for-download.py [ ...]` +Synopsis: `zip-for-download.py3 [ ...]` Output is JSON object with form: { message: , diff --git a/packaging/el7/main.spec b/packaging/el7/main.spec index e98c67f..eee3a24 100644 --- a/packaging/el7/main.spec +++ b/packaging/el7/main.spec @@ -18,7 +18,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %prep %setup -q -alias python=python3 %build # empty