Skip to content

Commit

Permalink
Rename tools, always output blob as raw bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
renzenicolai committed Mar 23, 2023
1 parent eabed27 commit c76c1bd
Show file tree
Hide file tree
Showing 19 changed files with 1 addition and 2 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions webusb_nvs_read.py → configuration_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
parser.add_argument("namespace", help="Namespace")
parser.add_argument("key", help="Key")
parser.add_argument("type", help="Type, one of u8, i8, u16, i16, u32, i32, u64, i64, string or blob")
parser.add_argument('--raw', '-r', '-R', action='store_true', help="Output raw bytes (only used for blob type)")
args = parser.parse_args()

badge = Badge()
Expand All @@ -23,7 +22,7 @@

value = badge.nvs_read(args.namespace, args.key, type_number)

if args.raw and type_name == "blob":
if type_name == "blob":
sys.stdout.buffer.write(value)
else:
print(value)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c76c1bd

Please sign in to comment.