ChaterJee 0.5.3__tar.gz → 0.5.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -473,13 +473,22 @@ class NoteLogs:
473
473
  jobs = json.load(ffr)
474
474
  except FileNotFoundError:
475
475
  jobs = {}
476
- jobs[self.jobNAME] = {\
477
- "logDIR": self.logDIR, \
478
- "logFILE": self.logFILE, \
479
- "logIMAGE": self.logIMAGE, \
480
- "logDICT": self.logDICT \
481
- }
482
- with open(jobs_file, 'w') as ffw:
483
- json.dump(jobs, ffw, indent=4)
476
+ try:
477
+ jobD = jobs[self.jobNAME]
478
+ except KeyError:
479
+ jobs[self.jobNAME] = {}
480
+ jobD = {}
481
+ if self.logDIR is not None:
482
+ jobD["logDIR"] = self.logDIR
483
+ if self.logFILE is not None:
484
+ jobD["logFILE"] = self.logFILE
485
+ if self.logIMAGE is not None:
486
+ jobD["logIMAGE"] = self.logIMAGE
487
+ if self.logDICT is not None:
488
+ jobD["logDICT"] = self.logDICT
489
+ if len(jobD):
490
+ jobs[self.jobNAME] = jobD
491
+ with open(jobs_file, 'w') as ffw:
492
+ json.dump(jobs, ffw, indent=4)
484
493
 
485
494
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ChaterJee
3
- Version: 0.5.3
3
+ Version: 0.5.4
4
4
  Summary: Communicate your project updates via Telegram Bot!
5
5
  Author: Pallab Dutta
6
6
  Author-email: pallab9997@gmail.com
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ChaterJee
3
- Version: 0.5.3
3
+ Version: 0.5.4
4
4
  Summary: Communicate your project updates via Telegram Bot!
5
5
  Author: Pallab Dutta
6
6
  Author-email: pallab9997@gmail.com
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='ChaterJee',
5
- version='0.5.3',
5
+ version='0.5.4',
6
6
  packages=find_packages(),
7
7
  install_requires=[
8
8
  'python-telegram-bot==20.7',
File without changes
File without changes