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() { check_if_exists() {
return new Promise((resolve, reject) => { 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.done((data) => {resolve(false)});
proc.fail((e, data) => {resolve(true)}); proc.fail((e, data) => {resolve(true)});
}); });
@ -96,7 +96,7 @@ export class FileUpload {
return; return;
} }
this.make_html_element(); 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.proc.fail((e, data) => {
this.reader.onload = () => {} this.reader.onload = () => {}
this.done(); this.done();

View File

@ -99,7 +99,7 @@ export class NavContextMenu {
zip_for_download() { zip_for_download() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
var cmd = [ 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() this.nav_window_ref.pwd().path_str()
]; ];
for (let entry of this.nav_window_ref.selected_entries) { 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) => { return new Promise(async (resolve, reject) => {
var children = []; var children = [];
var proc = cockpit.spawn( 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"} {err:"out", superuser: "try"}
); );
proc.fail((e, data) => { proc.fail((e, data) => {
@ -139,7 +139,7 @@ export class NavDir extends NavEntry {
async cephfs_dir_stats() { async cephfs_dir_stats() {
try { try {
var proc = await cockpit.spawn( 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"} {err: "ignore"}
); );
return JSON.parse(proc)[0]; return JSON.parse(proc)[0];

View File

@ -38,7 +38,7 @@ export class NavDragDrop {
} }
if (file.size === 0) { if (file.size === 0) {
var proc = cockpit.spawn( 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"} {superuser: "try", err: "out"}
); );
proc.done(() => { proc.done(() => {

View File

@ -455,7 +455,7 @@ export class NavWindow {
} }
var promise = new Promise((resolve, reject) => { var promise = new Promise((resolve, reject) => {
var proc = cockpit.spawn( 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"} {superuser: "try", err: "out"}
); );
proc.done((data) => { proc.done((data) => {
@ -545,7 +545,7 @@ export class NavWindow {
async paste_clipboard() { async paste_clipboard() {
this.start_load(); 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(); var dest = this.pwd().path_str();
if (this.copy_or_move === "move") { if (this.copy_or_move === "move") {
cmd.push("-m"); 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 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: JSON objects are of form:
obj = { obj = {
seek: <byte offset> 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: Output is JSON object with form:
{ {
message: <error message if applicable>, message: <error message if applicable>,

View File

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