Removed unnecessary gpl switch

This commit is contained in:
Anon 2022-08-27 02:32:18 -07:00
parent b44a008658
commit a1defbb294

View File

@ -167,23 +167,6 @@ class FailedSanityTest(Exception):
class FailedToLoadCfg(Exception): class FailedToLoadCfg(Exception):
pass pass
def print_gpl():
print("Yandere Lewd Bot, an image posting bot for Pleroma")
print("Copyright (C) 2022 Anon")
print("")
print("This program is free software: you can redistribute it and/or modify")
print("it under the terms of the GNU General Public License as published by")
print("the Free Software Foundation, either version 3 of the License, or")
print("(at your option) any later version.")
print("")
print("This program is distributed in the hope that it will be useful,")
print("but WITHOUT ANY WARRANTY; without even the implied warranty of")
print("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the")
print("GNU General Public License for more details.")
print("")
print("You should have received a copy of the GNU General Public License")
print("along with this program. If not, see <https://www.gnu.org/licenses/>.")
# Entry point if run from the command line # Entry point if run from the command line
def main(): def main():
# Default config file # Default config file
@ -200,17 +183,11 @@ def main():
parser.add_argument("-t", "--time", help="Wait for time before posting first image", default=None) parser.add_argument("-t", "--time", help="Wait for time before posting first image", default=None)
parser.add_argument("-d", "--date", help="Wait for date before posting first image", default=None) parser.add_argument("-d", "--date", help="Wait for date before posting first image", default=None)
parser.add_argument("-c", "--config", help="Set custom config file (Default: {})".format(default_cfg), default=default_cfg) parser.add_argument("-c", "--config", help="Set custom config file (Default: {})".format(default_cfg), default=default_cfg)
parser.add_argument("-l", "--license", help="Display GPL license", action="store_true")
parser.add_argument("-o", "--output-hashes", help="Output list of hashes", action="store_true") parser.add_argument("-o", "--output-hashes", help="Output list of hashes", action="store_true")
parser.add_argument("-h", "--help", help="Show this help message and exit", action="store_true") parser.add_argument("-h", "--help", help="Show this help message and exit", action="store_true")
parser.add_argument("remainder", help=argparse.SUPPRESS, nargs=argparse.REMAINDER) parser.add_argument("remainder", help=argparse.SUPPRESS, nargs=argparse.REMAINDER)
arguments = parser.parse_args() arguments = parser.parse_args()
# Display gpl license
if arguments.license:
print_gpl()
return 0
# Redirect stdout when the bot first initializes if the bot is not going to run normally # Redirect stdout when the bot first initializes if the bot is not going to run normally
redirect_stdout = None if arguments.output_hashes or arguments.help else sys.stdout redirect_stdout = None if arguments.output_hashes or arguments.help else sys.stdout