Browse Source

fixing bug in command exec (#75)

thanks
Gero Schwäricke 6 years ago
parent
commit
70f5ae5b5d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      nodemcu_uploader/uploader.py

+ 2 - 2
nodemcu_uploader/uploader.py

@@ -327,11 +327,11 @@ class Uploader(object):
         filename = os.path.basename(path)
         log.info('Execute %s', filename)
 
-        content = from_file(path)
+        content = from_file(path).replace('\r', '').split('\n')
 
         res = '> '
         for line in content:
-            line = line.rstrip('\r\n')
+            line = line.rstrip('\n')
             retlines = (res + self.__exchange(line)).splitlines()
             # Log all but the last line
             res = retlines.pop()