diff options
author | Alexandre Iooss | 2016-08-16 14:28:31 +0200 |
---|---|---|
committer | Alexandre Iooss | 2016-08-16 14:28:31 +0200 |
commit | 7bd88d1e2bb1b3e35b25bdb81c6b5da4b98ac059 (patch) | |
tree | 828b2a17ad71e08f763ccabdf563b80e7fb624d0 /PARROT-DEV-if-include-xml-files-does-not-exist-in-same-dire.patch | |
download | aur-7bd88d1e2bb1b3e35b25bdb81c6b5da4b98ac059.tar.gz |
First commit, need manual patch
Diffstat (limited to 'PARROT-DEV-if-include-xml-files-does-not-exist-in-same-dire.patch')
-rw-r--r-- | PARROT-DEV-if-include-xml-files-does-not-exist-in-same-dire.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/PARROT-DEV-if-include-xml-files-does-not-exist-in-same-dire.patch b/PARROT-DEV-if-include-xml-files-does-not-exist-in-same-dire.patch new file mode 100644 index 000000000000..5531416fd0d8 --- /dev/null +++ b/PARROT-DEV-if-include-xml-files-does-not-exist-in-same-dire.patch @@ -0,0 +1,30 @@ +From 41ba6842262d7a0150b0e942007e92194b21bccd Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Dubois <jean-baptiste.dubois@parrot.com> +Edited by: Alexandre Iooss <alexandre.iooss@gmail.com> +Date: Wed, 22 Apr 2015 18:44:10 +0200 +Subject: [PATCH 03/10] [DEV] if <include> xml files does not exist in same + directory try with mavlink default dir + +Change-Id: I6bb26be945e9b890e07bc7c4d71a6e9b08ff06e7 +--- + pymavlink/generator/mavgen.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/pymavlink/generator/mavgen.py b/pymavlink/generator/mavgen.py +index 2996350..a5dfd9c 100755 +--- a/pymavlink/generator/mavgen.py ++++ b/pymavlink/generator/mavgen.py +@@ -61,6 +61,10 @@ def mavgen(opts, args) : + for x in xml[:]: + for i in x.include: + fname = os.path.join(os.path.dirname(x.filename), i) ++ ## if xml file does not exist try to with mavlink "dialects" directory ++ if not os.path.exists(fname): ++ fname = os.path.join(os.path.dirname(__file__), "..", ++ "dialects", "v10", i) + + ## Validate XML file with XSD file if possible. + if opts.validate: +-- +2.9.3 + |