Fixed whitespace
This commit is contained in:
parent
9a2bf20eef
commit
5a4e251602
@ -16,6 +16,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
@ -116,9 +117,9 @@ def config_parser_has_option(config, profile, option):
|
|||||||
|
|
||||||
def get_default_path(filename):
|
def get_default_path(filename):
|
||||||
paths = (".", os.environ["HOME"], "/root", "/")
|
paths = (".", os.environ["HOME"], "/root", "/")
|
||||||
for path in path:
|
for path in paths:
|
||||||
full_path = os.path.join(path, filename)
|
full_path = os.path.join(path, filename)
|
||||||
if os.file.exists(full_path):
|
if os.path.isfile(full_path):
|
||||||
return full_path
|
return full_path
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
@ -130,7 +131,7 @@ def main():
|
|||||||
# String constants
|
# String constants
|
||||||
default_secret_file = ".credentials.secret"
|
default_secret_file = ".credentials.secret"
|
||||||
default_profile = "CLOUDFLARE"
|
default_profile = "CLOUDFLARE"
|
||||||
default_fullpath = get_defualt_path(default_secret_file)
|
default_fullpath = get_default_path(default_secret_file)
|
||||||
|
|
||||||
# Find the default path to crdentials file
|
# Find the default path to crdentials file
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user