Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MayankFawkes committed Apr 29, 2021
1 parent 738a10f commit cd1a5d2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelogs

## V1.1.1

* fixed list bug
10 changes: 7 additions & 3 deletions transfer/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
from transfer.table import Table
import argparse, re, signal
from os import access, R_OK
from os.path import isfile
from os.path import isfile, sep
from typing import Dict
from typing import Union
from typing import List
from json import loads, dumps
from tempfile import gettempdir


class ActionCheck(object):
Expand Down Expand Up @@ -45,11 +46,14 @@ def __call__(self, value):
return getattr(self, self.test)(value)

class log:
FILE_NAME = "transfer.log"
def __init__(self):
self.FILE_NAME = self._get_file_name()
if not isfile(self.FILE_NAME):
open(self.FILE_NAME, 'a').close()

def _get_file_name(self, name:str=".transfer.log"):
return f"{gettempdir()}{sep}{name}"

def _get(self) -> Union[List[None], List[Dict[str, str]]]:
with open(self.FILE_NAME, "r") as file:
data = file.read()
Expand Down Expand Up @@ -173,4 +177,4 @@ def main():
CLI()

if __name__ == "__main__":
main()
main()
2 changes: 1 addition & 1 deletion transfer/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.1.0"
__version__ = "1.1.1"


if __name__ == '__main__':
Expand Down

0 comments on commit cd1a5d2

Please sign in to comment.