Skip to content

Commit

Permalink
crash when post_format missing... no reason to require it.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva committed Apr 26, 2024
1 parent a75943d commit a85e5b0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
4 changes: 3 additions & 1 deletion sarracenia/flow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,9 @@ def work(self) -> None:
if '_format' in m:
m['old_format'] = m['_format']
m['_deleteOnPost'] |= set(['old_format'])
m['_format'] = m['post_format']

if 'post_format' in m:
m['_format'] = m['post_format']

# restore adjustment to fileOp
if 'post_fileOp' in m:
Expand Down
23 changes: 18 additions & 5 deletions sarracenia/flowcb/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,16 @@ def _messageStr(self, msg):
if self.o.logMessageDump:
return msg.dumps()
else:
return msg['baseUrl'] + ' ' + msg['relPath']
s = ''
if 'baseUrl' in msg:
s+= msg['baseUrl'] + ' '
if 'relPath' in msg:
s+= msg['relPath']
elif 'retrievePath' in msg:
s+= msg['retrievePath']
else:
s+= 'badMessage'
return s

def _messageAcceptStr(self,msg):
if self.o.logMessageDump:
Expand Down Expand Up @@ -115,13 +124,17 @@ def _messagePostStr(self,msg):
op=','.join(msg['fileOp'].keys())

if op in ['link']:
s+= f"a link to {msg['fileOp']['link']} with baseUrl: {msg['baseUrl']} "
s+= f"a link to {msg['fileOp']['link']} "
elif op in ['rename']:
s+= f"a rename {msg['fileOp']['rename']} with baseUrl: {msg['baseUrl']} "
s+= f"a rename {msg['fileOp']['rename']} "
else:
s+= f"a {op} with baseUrl: {msg['baseUrl']} "
s+= f"a {op} "
else:
s+= f"a file with baseUrl: {msg['baseUrl']} "
s+= f"a file "

if 'baseURl' in msg:
s+= f"with baseUrl: {msg['baseUrl']} "

if 'relPath' in msg:
s+= f"relPath: {msg['relPath']} "
if 'retrievePath' in msg:
Expand Down

1 comment on commit a85e5b0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report •
FileStmtsMissCoverMissing
__init__.py4094489%69–70, 72, 79, 82, 86–87, 89–90, 97, 103, 106, 108–109, 111–112, 114–115, 319, 430, 463, 530–531, 560–561, 607, 620, 622, 632–634, 644–645, 674, 683, 779, 812, 828, 882–886, 892
sr.py201820180%8, 21, 23–42, 44, 46–49, 51–52, 54, 56, 58, 66, 68, 72–73, 75, 80–84, 86–88, 91, 103, 107, 111–119, 121, 123, 128–129, 131, 133–134, 136, 138, 140, 142–151, 153, 157, 159, 162–165, 167, 169–171, 176, 181, 184–186, 188–190, 192–193, 198–199, 202, 206–210, 212–213, 215–216, 221, 224–225, 228–234, 236–237, 239, 241, 244, 247, 249–257, 259, 262, 266–277, 279, 281–290, 293–294, 296, 298–300, 302, 304, 306–320, 322, 324–328, 334–337, 339–340, 344–346, 348–349, 351, 353–356, 358, 360, 362, 368, 370–371, 373–374, 376–377, 379, 382–383, 385–386, 388–391, 393, 396–407, 409, 413–418, 420–441, 443–446, 449, 452–455, 457–460, 462–464, 466, 468–475, 477–478, 481–484, 486, 488–489, 491–492, 494–496, 498–511, 514, 517, 519–521, 523, 525–526, 528–530, 532–534, 536–537, 539–540, 542–545, 547–550, 553–556, 558, 560–561, 563, 566–576, 578, 580–582, 584–585, 587, 589–593, 595, 597–602, 604–605, 607–613, 615, 617–620, 623, 627–640, 642, 644–649, 651, 653–654, 656–658, 661, 663–668, 674–681, 683, 685–696, 698–700, 702–704, 706, 708, 710–714, 716, 718, 723, 727–729, 731–732, 734, 736–737, 739–744, 746–747, 749, 754, 758–760, 762–763, 765, 767–768, 770–775, 777–778, 780, 785–786, 788–790, 792–794, 796, 798, 807, 809–810, 812–819, 823, 825, 828–830, 832, 834–835, 837–840, 842–845, 847, 849–851, 853, 855–856, 858, 860–861, 863, 866–867, 869–874, 876–877, 879–883, 885, 892–893, 895–896, 899–904, 906–909, 911–921, 923, 927–929, 931, 935, 937, 939–940, 942–955, 957, 961–962, 964–965, 967, 969–977, 979, 981–993, 996, 998–999, 1001–1006, 1008–1012, 1014–1016, 1018–1024, 1026–1027, 1031, 1038–1043, 1045–1047, 1049–1055, 1057–1064, 1066–1068, 1070–1073, 1075–1080, 1082–1084, 1086–1088, 1091–1093, 1095–1097, 1099–1100, 1102–1104, 1106–1113, 1118–1122, 1128–1131, 1133–1134, 1137–1139, 1141–1144, 1146, 1149, 1154–1156, 1158–1165, 1167–1168, 1170–1171, 1178–1180, 1182–1184, 1186, 1190, 1194, 1198–1201, 1203, 1206, 1208, 1210, 1212–1213, 1216–1218, 1220–1230, 1232–1234, 1237–1238, 1240–1249, 1252–1254, 1256–1261, 1263–1265, 1267–1269, 1271–1272, 1276–1282, 1284, 1286–1289, 1291–1295, 1299–1300, 1302–1303, 1305, 1308, 1310–1315, 1317–1325, 1327, 1329–1335, 1338–1352, 1356, 1362–1365, 1372–1373, 1376–1380, 1382–1386, 1389, 1396–1397, 1400–1403, 1405, 1407–1418, 1421–1424, 1426, 1428–1429, 1431–1439, 1441–1444, 1446–1450, 1452–1453, 1455–1457, 1459–1467, 1470, 1472–1476, 1478–1479, 1481–1482, 1484–1486, 1488–1489, 1492, 1494, 1496–1497, 1499–1500, 1502, 1504–1505, 1507, 1509–1512, 1514–1518, 1520–1525, 1527–1528, 1530, 1533–1536, 1538, 1540–1541, 1543–1551, 1553–1561, 1563–1564, 1566–1567, 1569, 1571–1572, 1574–1575, 1578, 1580–1584, 1586–1587, 1589–1590, 1592–1596, 1598–1600, 1602, 1604, 1608, 1610–1612, 1616–1621, 1623–1625, 1627, 1629, 1631, 1633, 1635, 1637–1639, 1641, 1643–1648, 1650, 1652, 1654, 1665–1668, 1670–1682, 1684–1687, 1696–1699, 1702–1705, 1707, 1709–1710, 1712–1720, 1723–1725, 1727–1728, 1730, 1732–1737, 1739–1740, 1742–1744, 1746–1748, 1750, 1752–1759, 1761, 1763, 1767–1768, 1771–1776, 1778, 1780–1784, 1786, 1788–1790, 1792, 1798–1799, 1802–1804, 1806–1816, 1818, 1820–1822, 1824, 1829–1831, 1833–1834, 1838–1840, 1844–1846, 1851, 1855–1857, 1861, 1863, 1865, 1869–1871, 1873–1874, 1876–1885, 1887–1888, 1890, 1892–1894, 1896–1898, 1901, 1903–1905, 1907–1908, 1910–1911, 1913–1914, 1916, 1918–1924, 1926–1927, 1929–1930, 1932–1934, 1936, 1942–1949, 1951–1953, 1955–1956, 1958, 1960, 1965–1968, 1972, 1977–1994, 1996–2001, 2004–2012, 2014–2017, 2019–2022, 2025–2026, 2028–2031, 2034–2037, 2039, 2041–2042, 2044–2052, 2054, 2060–2061, 2063–2067, 2069, 2072, 2074–2076, 2078–2083, 2085, 2087, 2093–2104, 2106, 2111, 2113–2115, 2117–2119, 2122, 2124–2130, 2132–2133, 2135, 2138–2140, 2142–2143, 2146–2149, 2151–2154, 2156–2159, 2161–2163, 2165–2167, 2169, 2172–2175, 2178, 2180–2184, 2186–2189, 2191–2194, 2196–2202, 2204, 2206–2210, 2212–2214, 2216–2226, 2228–2230, 2233–2234, 2236–2243, 2245–2247, 2249–2254, 2257–2262, 2264–2265, 2267–2269, 2271, 2275–2276, 2284–2285, 2287–2300, 2302–2314, 2316–2335, 2337–2343, 2345–2347, 2349–2350, 2352–2374, 2376, 2381, 2383–2385, 2387–2388, 2390, 2392–2393, 2395–2396, 2398, 2401–2402, 2404–2406, 2408–2409, 2411–2426, 2428–2434, 2436–2437, 2440–2445, 2447–2449, 2451–2457, 2459–2460, 2462–2468, 2470, 2472–2473, 2475–2477, 2479–2483, 2485–2489, 2491–2493, 2495–2496, 2498–2501, 2503–2506, 2508–2509, 2513–2514, 2516, 2518–2519, 2521, 2523, 2525–2530, 2532–2533, 2535, 2537, 2546–2547, 2561–2563, 2566–2567, 2570–2571, 2574, 2578–2580, 2582–2588, 2591, 2593, 2597, 2600–2601, 2603, 2605, 2612, 2619–2622, 2624–2631, 2633–2640, 2642–2643, 2645–2646, 2648–2650, 2652–2657, 2659–2661, 2663–2674, 2676–2679, 2681–2686, 2688–2699, 2701–2702, 2704–2705, 2707–2715, 2717–2726, 2728–2729, 2731–2733, 2735, 2737–2739, 2741–2742, 2744–2745, 2747–2750, 2752–2757, 2759–2762, 2764, 2767, 2772, 2775, 2778, 2781–2784, 2786, 2788, 2790–2791, 2793–2795, 2797, 2799–2801, 2803–2805, 2807–2808, 2810–2811, 2814, 2817, 2819–2820, 2823–2824, 2827, 2829, 2832, 2834–2837, 2840, 2842–2847, 2850, 2854–2857, 2859, 2861, 2874–2875, 2877–2880, 2882–2883, 2885, 2887, 2896–2897, 2899, 2909, 2913, 2918–2919, 2922, 2924–2926, 2928, 2930, 2935, 2945, 2950–2952, 2954, 2956–2957, 2960, 2966–2968, 2970–2972, 2974–2976, 2978–2981, 2983–2986, 2988–2989, 2991–2992, 2994–2995, 2997–2998, 3000–3001, 3003–3004, 3006–3007, 3009–3010, 3012–3013, 3015–3016, 3018–3022, 3024–3026, 3028–3029, 3031–3033, 3035–3037, 3039–3041, 3043–3045, 3047–3049, 3051
flow
   __init__.py156714914%36, 122–123, 125, 127–129, 131–133, 140, 142–143, 148, 150–151, 156, 158–159, 161, 164–166, 169–174, 178, 181, 187–189, 191, 194, 197, 200–202, 205–206, 209, 211, 214–215, 219, 224–226, 228–229, 231, 235–236, 238–244, 246–253, 256–259, 261–262, 264, 266, 268, 270–272, 276–279, 281–285, 288–290, 292–296, 304–307, 309, 311–316, 318–321, 323–328, 334–337, 339–341, 348, 351–352, 354–364, 366, 368, 374–375, 378, 381–383, 388–391, 396–399, 401–405, 409–415, 417–421, 430–431, 433, 435, 437–443, 445–447, 449–450, 454–456, 458, 460–464, 466–467, 469, 471–474, 476, 478, 480–481, 483–484, 486–488, 490–491, 493, 496–498, 501–502, 504–506, 508–509, 511–512, 514, 516–517, 519, 521, 523, 525–526, 528, 531–532, 534, 536, 538, 540, 542, 546–547, 549–553, 557–559, 561, 564–565, 567–572, 574, 576–578, 580, 595, 597–600, 602–604, 606, 608–614, 616–624, 626, 628, 630–631, 633–638, 640, 642, 644–645, 647–664, 667–668, 671, 673–674, 705, 707–709, 711, 713, 716, 723–724, 730–732, 734–741, 747–749, 755, 757–760, 762, 768–770, 773–781, 784, 788, 790–791, 793–796, 801–803, 805–808, 810, 812–817, 819–821, 823–831, 833–842, 844–845, 847, 850, 852–853, 855–857, 862, 865, 867–872, 874–879, 883, 885–886, 888–889, 891–903, 905–908, 910, 912, 914–915, 917, 919, 921–928, 930–933, 935–938, 941, 944, 946, 950–951, 953–960, 965, 967–968, 970, 975, 977, 979, 981, 983, 985, 989–993, 997–1001, 1004–1007, 1009–1013, 1015–1017, 1020–1022, 1024, 1027–1028, 1030–1033, 1035, 1037–1041, 1047–1048, 1051–1052, 1054, 1058, 1061–1063, 1066–1067, 1069–1075, 1078–1081, 1083, 1085–1086, 1088, 1090–1096, 1098–1100, 1102–1103, 1106–1107, 1109, 1111, 1113, 1115–1117, 1123, 1127–1130, 1132–1137, 1139–1141, 1143–1151, 1153–1156, 1159–1163, 1165–1167, 1175–1180, 1182, 1184–1185, 1188–1192, 1194–1195, 1197, 1199–1202, 1204, 1206–1209, 1211–1213, 1215, 1217, 1222–1224, 1228, 1231, 1241, 1247, 1252, 1254, 1256–1260, 1262–1264, 1266, 1270–1273, 1275–1277, 1280, 1285–1292, 1294, 1297–1298, 1300–1301, 1305, 1323–1324, 1329–1330, 1336–1337, 1339, 1341, 1345–1347, 1349–1356, 1358–1359, 1361, 1363, 1368–1369, 1371, 1373–1374, 1376, 1378, 1380–1381, 1383–1386, 1389, 1391, 1394–1396, 1398, 1405, 1407–1416, 1418, 1424–1427, 1434, 1436, 1438–1444, 1447–1449, 1456–1458, 1460–1465, 1467–1469, 1471–1472, 1474, 1476–1477, 1479–1485, 1494, 1503–1509, 1511–1513, 1515–1516, 1519–1521, 1523–1524, 1526–1528, 1530, 1532, 1543–1546, 1548, 1550, 1554–1555, 1557–1558, 1560–1567, 1569–1570, 1572–1573, 1575–1580, 1584, 1588–1593, 1595–1598, 1600–1604, 1609–1610, 1612–1615, 1617–1621, 1626–1627, 1631–1634, 1636–1640, 1643–1644, 1646–1649, 1651–1655, 1658–1659, 1662, 1664–1677, 1680, 1683, 1686, 1688–1689, 1691–1692, 1696, 1698–1699, 1702–1704, 1707, 1710–1711, 1715–1717, 1719, 1721–1722, 1725–1731, 1735–1736, 1738–1739, 1741–1742, 1744–1747, 1749–1753, 1755, 1757, 1759–1760, 1762, 1766, 1776, 1778–1783, 1785, 1787, 1791, 1793–1798, 1800, 1802, 1804–1805, 1807, 1809–1810, 1812, 1815–1816, 1818–1819, 1821–1823, 1825–1833, 1835–1843, 1845, 1847–1849, 1851–1857, 1859–1860, 1862–1863, 1865–1868, 1870, 1872–1881, 1883–1884, 1886–1889, 1891, 1893–1897, 1899–1903, 1905–1907, 1917, 1919–1921, 1923–1926, 1928, 1930–1938, 1940–1941, 1943–1944, 1946, 1950, 1958–1961, 1963, 1965–1966, 1968–1969, 1972, 1976–1981, 1983, 1985, 1989, 1993–1995, 1999–2000, 2004, 2006–2007, 2009–2017, 2019–2021, 2025, 2029–2030, 2034–2035, 2037–2040, 2042, 2045–2048, 2051–2052, 2054–2055, 2057–2059, 2061–2062, 2064–2065, 2072–2073, 2075–2079, 2081–2082, 2084, 2086–2087, 2089–2090, 2092–2094, 2097–2104, 2106–2108, 2110–2113, 2117–2119, 2122–2128, 2130–2131, 2133–2134, 2137, 2140, 2142, 2144–2148, 2150–2153, 2155–2160, 2162, 2164–2165, 2167, 2169–2173, 2175, 2177–2181, 2183–2188, 2194, 2197, 2199, 2205–2206, 2208–2209, 2215, 2217–2218, 2224–2227, 2229–2230, 2232–2233, 2239–2245, 2247–2253, 2255–2265, 2267–2279, 2286–2308, 2315–2316, 2319–2320, 2322–2324, 2326, 2328–2331, 2333–2334, 2337–2339, 2343, 2347, 2351, 2353–2355, 2357–2358, 2360–2361, 2363–2367, 2370, 2372, 2374, 2376–2380, 2383–2388, 2390–2396, 2399, 2401, 2403–2408, 2411, 2413, 2415, 2417–2420, 2424–2425, 2428, 2432, 2434, 2437, 2439–2443, 2446–2450, 2452–2457, 2459, 2461, 2463, 2470, 2475–2477, 2479, 2481–2484, 2486–2487, 2489, 2491, 2493–2500, 2502–2503, 2505–2510, 2516–2527, 2529–2533, 2535–2544, 2553–2556, 2558, 2561–2564, 2566–2568, 2570–2572, 2574–2576, 2578–2580, 2588–2591, 2593–2596, 2598–2601
flowcb
   log.py1811810%3–5, 7, 10, 26, 28–29, 31–40, 42–43, 45–47, 49, 51–58, 60–61, 63–65, 67, 69–71, 73–79, 81–82, 84–86, 88–94, 96–99, 101, 103–110, 112–114, 116–117, 119–121, 123–124, 126–129, 131, 133, 135–136, 138–144, 146, 148–150, 152–155, 159, 161, 163–168, 170–175, 177–183, 187, 189–191, 193–194, 196–203, 205–207, 209, 211–212, 214–215, 217–218, 220–225, 227–228, 230, 233, 237, 240–241, 244–245, 247–248, 250–253, 255–258, 260–264
flowcb/filter
   wmo00_write.py31310%11–15, 17, 19, 22–26, 29, 32, 34, 36–37, 39–40, 42–45, 49–51, 53–54, 56–58
TOTAL153961256018% 

Test Results

Tests Skipped Failures Errors Time
209 8 💤 0 ❌ 0 🔥 16.766s ⏱️

Please sign in to comment.