mirror of
https://github.com/codingo/Interlace.git
synced 2025-12-18 07:14:20 +01:00
Added check and exception for writable folders
This commit is contained in:
@@ -2,6 +2,7 @@ from argparse import ArgumentParser
|
|||||||
from netaddr import IPNetwork, IPRange, IPGlob
|
from netaddr import IPNetwork, IPRange, IPGlob
|
||||||
from Interlace.lib.core.output import OutputHelper, Level
|
from Interlace.lib.core.output import OutputHelper, Level
|
||||||
import os.path
|
import os.path
|
||||||
|
from os import access, W_OK
|
||||||
import sys
|
import sys
|
||||||
from re import compile
|
from re import compile
|
||||||
|
|
||||||
@@ -68,6 +69,10 @@ class InputHelper(object):
|
|||||||
final_commands = set()
|
final_commands = set()
|
||||||
output = OutputHelper(arguments)
|
output = OutputHelper(arguments)
|
||||||
|
|
||||||
|
# checking for whether output is writable and whether it exists
|
||||||
|
if not access(arguments.output, W_OK):
|
||||||
|
raise Exception("Directory provided isn't writable")
|
||||||
|
|
||||||
if arguments.port:
|
if arguments.port:
|
||||||
if "," in arguments.port:
|
if "," in arguments.port:
|
||||||
ports = arguments.port.split(",")
|
ports = arguments.port.split(",")
|
||||||
|
|||||||
Reference in New Issue
Block a user