Compare commits
No commits in common. "d5bcc27608003a0bab8afe5c8375f46a1412a837" and "591ac112dd71fec5b3e0f5232f09d8d39eaaadbf" have entirely different histories.
d5bcc27608
...
591ac112dd
|
@ -55,11 +55,10 @@ def status(json_data, verbose):
|
|||
pass
|
||||
|
||||
if json_data['state']['open'] is False:
|
||||
if verbose:
|
||||
print('{} is closed'.format(str(json_data['space'])))
|
||||
print(' {} is closed'.format(str(json_data['space'])))
|
||||
return False
|
||||
|
||||
print('{} is open'.format(str(json_data['space'])))
|
||||
print(' {} is open'.format(str(json_data['space'])))
|
||||
return True
|
||||
|
||||
|
||||
|
@ -116,22 +115,17 @@ def main(args):
|
|||
getHomepage(data, debug)
|
||||
sys.exit(0)
|
||||
|
||||
if status(data, debug):
|
||||
if status(data, verbose=False):
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description='Show Space Status')
|
||||
parser.add_argument('-n', '--name', help='Name of Hackerspace',
|
||||
default='LeineLab')
|
||||
parser.add_argument('-d', '--details',
|
||||
help='Shows more details of Hackerspace')
|
||||
parser.add_argument('-l', '--list', action='store_true',
|
||||
help='List all Hackspaces on Spaceapi')
|
||||
parser.add_argument('-v', '--verbose', action='store_true',
|
||||
help='verbose output')
|
||||
parser.add_argument('-w', '--web', action='store_true',
|
||||
help='get homepage url')
|
||||
parser.add_argument('-n', '--name', help='Name of Hackerspace', default='LeineLab')
|
||||
parser.add_argument('-d', '--details', help='Shows more details of Hackerspace')
|
||||
parser.add_argument('-l', '--list', action='store_true', help='List all Hackspaces on Spaceapi')
|
||||
parser.add_argument('-v', '--verbose', action='store_true', help='verbose output')
|
||||
parser.add_argument('-w', '--web', action='store_true', help='get homepage url')
|
||||
args = parser.parse_args()
|
||||
|
||||
main(args)
|
||||
|
|
Loading…
Reference in New Issue