comparison sat_frontends/jp/common.py @ 3037:d314d4181f30

jp (common): fixed draft path use in BaseEdit
author Goffi <goffi@goffi.org>
date Mon, 26 Aug 2019 09:14:58 +0200
parents ab2696e34d29
children fee60f17ebac
comparison
equal deleted inserted replaced
3036:3338c6a634f5 3037:d314d4181f30
424 # this will write content of the existing item at the end of the draft. 424 # this will write content of the existing item at the end of the draft.
425 # This way no data should be lost. 425 # This way no data should be lost.
426 content_file_obj.seek(0, os.SEEK_END) 426 content_file_obj.seek(0, os.SEEK_END)
427 elif self.args.draft_path: 427 elif self.args.draft_path:
428 # there is an existing draft that we use 428 # there is an existing draft that we use
429 content_file_path = os.path.expanduser(self.args.item) 429 content_file_path = os.path.expanduser(self.args.draft_path)
430 content_file_obj = open(content_file_path, "r+b") 430 content_file_obj = open(content_file_path, "r+b")
431 # we seek at the end for the same reason as above 431 # we seek at the end for the same reason as above
432 content_file_obj.seek(0, os.SEEK_END) 432 content_file_obj.seek(0, os.SEEK_END)
433 else: 433 else:
434 # we need a temporary file 434 # we need a temporary file