rename scripts from *.py to *.py3

This commit is contained in:
joshuaboud 2021-07-15 14:05:34 -03:00
parent 05a98853db
commit 94552ac9a2
No known key found for this signature in database
GPG Key ID: 17EFB59E2A8BF50E
13 changed files with 11 additions and 12 deletions

View File

@ -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();

View File

@ -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) {

View File

@ -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];

View File

@ -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(() => {

View File

@ -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");

View File

@ -18,7 +18,7 @@
"""
"""
Synopsis: `paste.py [-m] <cwd of copy> <list of source files> <destination directory>`
Synopsis: `paste.py3 [-m] <cwd of copy> <list of source files> <destination directory>`
all full paths
"""

View File

@ -18,7 +18,7 @@
"""
"""
Synopsis: `write-chunks.py <newline delimited JSON objects>`
Synopsis: `write-chunks.py3 <newline delimited JSON objects>`
JSON objects are of form:
obj = {
seek: <byte offset>

View File

@ -18,7 +18,7 @@
"""
"""
Synopsis: `zip-for-download.py </path/to/cwd> </path/to/file> [</path/to/file> ...]`
Synopsis: `zip-for-download.py3 </path/to/cwd> </path/to/file> [</path/to/file> ...]`
Output is JSON object with form:
{
message: <error message if applicable>,

View File

@ -18,7 +18,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%prep
%setup -q
alias python=python3
%build
# empty