-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7a7ec7
commit 700de5b
Showing
2 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# Copyright (c) 2021-2022 José Manuel Barroso Galindo <[email protected]> | ||
from src.downloader.other import strtobool | ||
|
||
|
||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -16,9 +18,6 @@ | |
# You can download the latest version of this tool from: | ||
# https://github.com/MiSTer-devel/Downloader_MiSTer | ||
|
||
import distutils | ||
import distutils.util | ||
|
||
|
||
class IniParser: | ||
def __init__(self, ini_args): | ||
|
@@ -31,7 +30,7 @@ def get_string(self, key, default): | |
return self._ini_args.get(key, default).strip('"\' ') | ||
|
||
def get_bool(self, key, default): | ||
return bool(distutils.util.strtobool(self.get_string(key, 'true' if default else 'false'))) | ||
return bool(strtobool(self.get_string(key, 'true' if default else 'false'))) | ||
|
||
def get_int(self, key, default): | ||
result = self.get_string(key, None) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters