Mercurial > libervia-backend
comparison sat_frontends/jp/common.py @ 3631:bef32f3ccc06
merge branche "@"
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 27 Aug 2021 14:51:40 +0200 |
parents | 82e616b70a2a |
children | 9ca19b317293 fc24e611c9aa |
comparison
equal
deleted
inserted
replaced
3625:6559c0f847d4 | 3631:bef32f3ccc06 |
---|---|
197 content_file_obj.seek(0) | 197 content_file_obj.seek(0) |
198 tmp_ori_hash = hashlib.sha1(content_file_obj.read()).digest() | 198 tmp_ori_hash = hashlib.sha1(content_file_obj.read()).digest() |
199 content_file_obj.close() | 199 content_file_obj.close() |
200 | 200 |
201 # we prepare arguments | 201 # we prepare arguments |
202 editor = config.getConfig(self.sat_conf, "jp", "editor") or os.getenv( | 202 editor = config.getConfig(self.sat_conf, C.CONFIG_SECTION, "editor") or os.getenv( |
203 "EDITOR", "vi" | 203 "EDITOR", "vi" |
204 ) | 204 ) |
205 try: | 205 try: |
206 # is there custom arguments in sat.conf ? | 206 # is there custom arguments in sat.conf ? |
207 editor_args = config.getConfig( | 207 editor_args = config.getConfig( |
208 self.sat_conf, "jp", editor_args_opt, Exception | 208 self.sat_conf, C.CONFIG_SECTION, editor_args_opt, Exception |
209 ) | 209 ) |
210 except (NoOptionError, NoSectionError): | 210 except (NoOptionError, NoSectionError): |
211 # no, we check if we know the editor and have special arguments | 211 # no, we check if we know the editor and have special arguments |
212 if self.use_metadata: | 212 if self.use_metadata: |
213 editor_args = EDITOR_ARGS_MAGIC.get(os.path.basename(editor), "") | 213 editor_args = EDITOR_ARGS_MAGIC.get(os.path.basename(editor), "") |