From c08ddc73838b08f9538a966d6ad8f9f8bc856cf9 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Mon, 12 Mar 2018 20:48:24 +0700 Subject: fake_trx: unify the GPL license header There is no need to manually put the license header as a variable in each application in order to print it. Let's use a common one. Change-Id: I1a6e8716a9069e7ade3ae15f2c04fd45d18e223c --- src/target/fake_trx/clck_gen.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/target/fake_trx/clck_gen.py') diff --git a/src/target/fake_trx/clck_gen.py b/src/target/fake_trx/clck_gen.py index e7e58a3b..83c0a64d 100755 --- a/src/target/fake_trx/clck_gen.py +++ b/src/target/fake_trx/clck_gen.py @@ -4,7 +4,7 @@ # Virtual Um-interface (fake transceiver) # Simple TDMA frame clock generator # -# (C) 2017 by Vadim Yanitskiy +# (C) 2017-2018 by Vadim Yanitskiy # # All Rights Reserved # @@ -22,6 +22,9 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +from copyright import print_copyright +CR_HOLDERS = [("2017-2018", "Vadim Yanitskiy ")] + import signal import time import sys @@ -30,13 +33,6 @@ from threading import Timer from udp_link import UDPLink from gsm_shared import * -COPYRIGHT = \ - "Copyright (C) 2017 by Vadim Yanitskiy \n" \ - "License GPLv2+: GNU GPL version 2 or later " \ - "\n" \ - "This is free software: you are free to change and redistribute it.\n" \ - "There is NO WARRANTY, to the extent permitted by law.\n" - class CLCKGen: # GSM TDMA definitions SEC_DELAY_US = 1000 * 1000 @@ -99,12 +95,12 @@ class CLCKGen: # Just a wrapper for independent usage class Application: def __init__(self): + # Print copyright + print_copyright(CR_HOLDERS) + # Set up signal handlers signal.signal(signal.SIGINT, self.sig_handler) - # Print copyright - print(COPYRIGHT) - def run(self): self.link = UDPLink("127.0.0.1", 5800, 5700) self.clck = CLCKGen([self.link], ind_period = 51) -- cgit v1.2.3