Skip to content

Commit adb2117

Browse files
committed
int(port)
1 parent c55caa7 commit adb2117

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
format:
2-
black myloginpath.py
2+
black myloginpath.py setup.py

myloginpath.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ def parse(login_path: str, path=None) -> dict:
3636
dict_type=dict, allow_no_value=True, default_section="~~~UNUSED~~~"
3737
)
3838
parser.read_string(read(path), source=path)
39-
return dict(parser.items(login_path))
39+
data = dict(parser.items(login_path))
40+
if 'port' in data:
41+
data['port'] = int(data['port'])
42+
return data
4043

4144

4245
def _get_login_path_file():

0 commit comments

Comments
 (0)