Add no-upload option
This commit is contained in:
parent
756f04da76
commit
ce8cef35fa
|
@ -464,6 +464,7 @@ def speedtest():
|
|||
parser.add_argument('--source', help='Source IP address to bind to')
|
||||
parser.add_argument('--version', action='store_true',
|
||||
help='Show the version number and exit')
|
||||
parser.add_argument('--no-upload', action='store_true', help='no upload speed test')
|
||||
|
||||
options = parser.parse_args()
|
||||
if isinstance(options, tuple):
|
||||
|
@ -523,7 +524,7 @@ def speedtest():
|
|||
except IndexError:
|
||||
print_('Invalid server ID')
|
||||
sys.exit(1)
|
||||
elif args.mini:
|
||||
elif not args.no_upload and args.mini:
|
||||
name, ext = os.path.splitext(args.mini)
|
||||
if ext:
|
||||
url = os.path.dirname(args.mini)
|
||||
|
@ -591,6 +592,7 @@ def speedtest():
|
|||
for size in sizesizes:
|
||||
for i in range(0, 25):
|
||||
sizes.append(size)
|
||||
if not args.no_upload:
|
||||
if not args.simple:
|
||||
print_('Testing upload speed', end='')
|
||||
ulspeed = uploadSpeed(best['url'], sizes, args.simple)
|
||||
|
|
Loading…
Reference in New Issue