1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

uavohash: normalize line endings before computing hash

Line endings in the UAVO XML files differ from file to file
and this results in different SHA1 sums being computed on
Windows vs. Linux/Mac.

This normalizes the line endings to LF (python native) while
processing the XML files.
This commit is contained in:
Stacey Sheldon 2012-10-14 13:32:39 -04:00
parent 173cf041cb
commit bc13c20bf3

View File

@ -268,7 +268,7 @@ def GetHashofDirs(directory, verbose=0, raw=0):
print 'Hashing', names
filepath = os.path.join(root,names)
try:
f1 = open(filepath, 'rb')
f1 = open(filepath, 'rU')
except:
# You can't open the file for some reason
f1.close()