> > *def get_fstype_of_mounted_partition(self, fs):* > """ > Get the filesystem type of the mounted partition. > > :partition_name : Partition path as string (e.g. /dev/mmcblk0p1) > :return: filesystem type as string or None if not found > """ > > * cmd = "blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)* > *return self._helper.execute_cmd_output_string(cmd)* > > > > root:~/qa/test_library# python3 sd.py > File "sd.py", line 99 > * cmd = "blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)* > * ^* > *SyntaxError: can't assign to literal* > root:~/qa/test_library# > looking at cmd = "blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)* It’s probably because you have “ characters that are inside “ characters and it can’t tell where the string ends. It looks like you are trying to do cmd = "blkid -o export %s | grep 'TYPE' | cut -d” = " -f3" % (fs)* which doesn’t make sense. Try using triple quotes instead so it’s clear what string you are trying to use. cmd = “""blkid -o export %s | grep 'TYPE' | cut -d"=" -f3”"" % (fs) — David Rock david at graniteweb.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4