1
0
Fork 0
flightgear/scripts/python
Florent Rougon c27ae92c73 terrasync.py: improve error handling
- New generic exception class TerraSyncPyException.

- Add subclass NetworkError of TerraSyncPyException.

- Raise a NetworkError exception when the HTTP return code is not 200.

- hash_of_file() does not silently ignore errors anymore; exceptions
  should be dealt with wherever appropriate by the callers.

  Whenever hash_of_file() returns, its return value is now the SHA-1
  hash of the specified file. This is less error-prone IMHO than
  returning None. Otherwise, calling code could erroneously conclude
  that there is a matching hash when the file to check is actually
  missing. For a concrete example, see the 'dirIndexHash' parameter of
  TerraSync.updateDirectory(), which so far is used precisely with the
  value None to express that "we are just starting the recursion and
  have no hash from the server to compare to".
2018-02-03 11:22:56 +01:00
..
demo.py George PATTERSON: 2006-10-29 12:34:26 +00:00
FGFSDemo.py Fixed a bug in FlightGear.py. Splitting name,value,type using whitespace 2002-07-22 23:25:28 +00:00
FlightGear.py George PATTERSON: 2006-10-29 12:34:26 +00:00
nasal_api_doc.py Ignore empty lines in html output. 2012-03-25 10:34:50 +02:00
terrasync.py terrasync.py: improve error handling 2018-02-03 11:22:56 +01:00