Skip to content

Commit b039880

Browse files
committed
250805.1
1 parent 3ac81ad commit b039880

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed
Binary file not shown.

easycoder/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
from .ec_timestamp import *
1212
from .ec_value import *
1313

14-
__version__ = "250804.1"
14+
__version__ = "250805.1"

easycoder/ec_core.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import json, math, hashlib, threading, os, subprocess, sys, time
1+
import json, math, hashlib, threading, os, subprocess, time
22
import numbers, base64, binascii, random, requests, paramiko
33
from psutil import Process
44
from datetime import datetime
@@ -771,6 +771,11 @@ def r_load(self, command):
771771
with sftp.open(path, 'r') as remote_file: content = remote_file.read().decode()
772772
except:
773773
errorReason = f'Unable to read from {path}'
774+
if command['or'] != None:
775+
print(f'Exception "{errorReason}": Running the "or" clause')
776+
return command['or']
777+
else:
778+
RuntimeError(self.program, f'Error: {errorReason}')
774779
else:
775780
filename = self.getRuntimeValue(command['file'])
776781
try:
@@ -1291,6 +1296,11 @@ def r_save(self, command):
12911296
with sftp.open(path, 'w') as remote_file: remote_file.write(content)
12921297
except:
12931298
errorReason = 'Unable to write to {path}'
1299+
if command['or'] != None:
1300+
print(f'Exception "{errorReason}": Running the "or" clause')
1301+
return command['or']
1302+
else:
1303+
RuntimeError(self.program, f'Error: {errorReason}')
12941304
else:
12951305
filename = self.getRuntimeValue(command['file'])
12961306
if filename.endswith('.json'): content = json.dumps(content)

0 commit comments

Comments
 (0)