From 05a9245a4c740a3b3530d3715ed9814d76e190e6 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Fri, 12 Oct 2018 15:49:45 -0600 Subject: [PATCH] Allow special characters in network passwords --- .bin/Scripts/functions/data.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.bin/Scripts/functions/data.py b/.bin/Scripts/functions/data.py index 029c674b..9557ebdb 100644 --- a/.bin/Scripts/functions/data.py +++ b/.bin/Scripts/functions/data.py @@ -372,12 +372,9 @@ def mount_network_share(server, read_write=False): username = server['User'] password = server['Pass'] if psutil.WINDOWS: - cmd = r'net use \\{ip}\{share} /user:{username} {password}'.format( - ip = server['IP'], - share = server['Share'], - username = username, - password = password) - cmd = cmd.split(' ') + cmd = [ + 'net', 'use', r'\\{IP}\{Share}'.format(**server), + '/user:{}'.format(username), password] warning = r'Failed to mount \\{Name}\{Share}, {IP} unreachable.'.format( **server) error = r'Failed to mount \\{Name}\{Share} ({IP})'.format(**server)